text
stringlengths
7
3.69M
import React from 'react'; import {BackHandler} from 'react-native'; import platform from '../native-base-theme/variables/platform'; import {createStore, combineReducers, compose, applyMiddleware} from 'redux'; import thunkMiddleware from 'redux-thunk'; import loggerMiddleware from 'redux-logger'; import {Provider, connect} from 'react-redux'; import {search} from './states/search'; import {toast} from './states/toast'; import { ListPosts, Home, Create, Mystuff, Music, Login, Registor, Main_state, Place_setting, Video_genres, Music_prefer, Video } from 'states/post-reducers.js'; import {StackNavigator, NavigationActions, addNavigationHelpers} from 'react-navigation'; import Article from './components/article'; import PostFormScreen from './components/PostFormScreen'; import ForecastScreen from './components/ForecastScreen'; const AppNavigator = StackNavigator({ Today: {screen: TodayScreen}, Forecast: {screen: ForecastScreen}, PostForm: {screen: PostFormScreen} }, { headerMode: 'none' }); class AppWithStyleAndNavigator extends React.Component { render() { return ( <AppNavigator navigation={addNavigationHelpers({ dispatch: this.props.dispatch, state: this.props.nav })}/> ); } componentDidMount() { BackHandler.addEventListener('hardwareBackPress', () => { const {dispatch, nav} = this.props; if (nav.index === 0) return false; dispatch(NavigationActions.back()) return true; }); } componentWillUnmount() { BackHandler.removeEventListener('hardwareBackPress'); } } const AppWithNavState = connect(state => ({ nav: state.nav }))(AppWithStyleAndNavigator); // Nav reducer const initialState = AppNavigator.router.getStateForAction(NavigationActions.navigate({routeName: 'Today'})); const nav = (state = initialState, action) => { const nextState = AppNavigator.router.getStateForAction(action, state); return nextState || state; }; // Create Redux store const store = createStore(combineReducers({ ListPosts, Home, Create, Mystuff, Music, Login, Registor, Main_state, Place_setting, Video_genres, Music_prefer, Video }), compose(applyMiddleware(thunkMiddleware))); export default class App extends React.Component { render() { return ( <Provider store={store}> <AppWithNavState/> </Provider> ); } }
const {validationResult}=require('express-validator') const controller ={ main:(req, res, next)=>{ res.render('index'); }, selec:(req,res,next)=>{ const datosUser=req.body const errors = validationResult(req) if(!errors.isEmpty()){ res.render('index',{ errors:errors.mapped(), data:req.body }) }else{ req.session.bgcolor = datosUser.colores res.locals.bgcolor = datosUser.colores req.session.userName = datosUser.name if(datosUser.recordame !== undefined){ res.cookie('color',datosUser.colores,{maxAge:60000}) } res.render('index',{datosUser}) } }, saludo:(req,res)=>{ res.render('usuario',{ userName: req.session.userName, bgcolor:req.session.bgcolor }) }, destroy:(req,res)=>{ req.session.destroy() res.cookie('color',null,{maxAge:-1}) res.redirect('/') } } module.exports = controller
import { useContext } from 'preact/hooks'; import { Modal } from '@hypothesis/frontend-shared'; import { Config } from '../config'; import ErrorDisplay from './ErrorDisplay'; /** * A general-purpose error dialog displayed when a frontend application cannot be launched. * * This is rendered as a non-closeable Modal. It cannot be dismissed. * * There are more specific error dialogs for some use cases * (e.g. OAuth2RedirectErrorApp, LaunchErrorDialog). */ export default function ErrorDialogApp() { const { errorDialog } = useContext(Config); const error = { code: errorDialog?.errorCode, details: errorDialog?.errorDetails ?? '', }; let description; let title; switch (error.code) { case 'reused_consumer_key': title = 'Consumer key registered with another site'; break; default: description = 'An error occurred when launching the Hypothesis application'; title = 'An error occurred'; } return ( <Modal onCancel={() => null} title={title} withCloseButton={false} withCancelButton={false} contentClass="LMS-Dialog LMS-Dialog--medium" > <ErrorDisplay error={error} description={description}> {error.code === 'reused_consumer_key' && ( <> <p> This Hypothesis {"installation's"} consumer key appears to have already been used on another site. This could be because: </p> <ul> <li> This consumer key has already been used on another site. A site admin must{' '} <a target="_blank" rel="noopener noreferrer" href="https://web.hypothes.is/get-help/" > request a new consumer key </a>{' '} for this site and re-install Hypothesis. </li> <li> This {"site's"} tool_consumer_instance_guid has changed. A site admin must{' '} <a target="_blank" rel="noopener noreferrer" href="https://web.hypothes.is/get-help/" > ask us to update the consumer key </a> . </li> </ul> </> )} </ErrorDisplay> </Modal> ); }
/* * Package Import */ import React from 'react'; /* * Local Import */ import './style.scss'; /* * Component */ const Footer = () => <footer>Made with ❤</footer>; /* * Export */ export default Footer;
angular.module('gamificationEngine.settings', []) .controller('SettingsCtrl', function ($scope, $rootScope, $window, $stateParams, gamesFactory) { $rootScope.currentNav = 'settings'; $rootScope.currentGameId = $stateParams.id; const extractChallengeSettings = (game) => { const originalSettings = game.settings ? game.settings.challengeSettings : {}; const challengeSettings = Object.assign(originalSettings); challengeSettings.startDate = new Date(originalSettings.startDate); return challengeSettings; }; const isChallengesHidden = (game) => { const challengeSettings = extractChallengeSettings(game); return challengeSettings != undefined && challengeSettings.disclosure != undefined && challengeSettings.disclosure.startDate != undefined; }; // Load game if($stateParams.id) { gamesFactory.getGameById($stateParams.id).then(function (game) { $scope.game = game; $scope.newGame = Object.create($scope.game); $scope.newGame.hideChallenges = isChallengesHidden($scope.game); $scope.newGame.challengeSettings = extractChallengeSettings($scope.game); if ($scope.game.expiration) { $scope.newGame.expiration = new Date($scope.game.expiration); } else { $scope.newGame.neverending = true; $scope.newGame.expiration = new Date(); } }, function () { //do nothing }); } else { $scope.game = {}; } // Error alerts object $scope.alerts = { 'editGameError': false, 'nameError': '', 'invalidTime': false, 'settingsEdited': false, 'error' : '' }; const resetAlerts = () => { $scope.alerts.settingsEdited = false; $scope.alerts.editGameError = false; $scope.alerts.nameError = ''; $scope.alerts.invalidTime = false; $scope.alerts.error = ''; }; // OK button click event-handler $scope.saveSettings = function () { var limit = ($scope.alerts.nameError) ? 1 : 0; var valid = true; resetAlerts(); if (document.getElementsByClassName('has-error').length > limit) { $scope.alerts.invalidTime = true; valid = false; } if (!$scope.newGame.name) { $scope.alerts.nameError = 'messages:msg_game_name_error'; valid = false; } else if(gamesFactory.existGameWithName($scope.newGame.name) && $scope.game.name !== $scope.newGame.name) { $scope.alerts.nameError = 'messages:msg_game_name_exists_error'; valid = false; } // check hideChallenges fields validity if($scope.newGame.hideChallenges) { const disclosureStartDate = $scope.newGame.challengeSettings.disclosure.startDate; const frequencyValue = $scope.newGame.challengeSettings.disclosure.frequency && $scope.newGame.challengeSettings.disclosure.frequency.value; const frequencyUnit = $scope.newGame.challengeSettings.disclosure.frequency && $scope.newGame.challengeSettings.disclosure.frequency.unit; if(disclosureStartDate == undefined){ $scope.alerts.error = 'Disclosure date is required'; valid = false; } else if (frequencyValue <= 0) { $scope.alerts.error = 'Frequency is required and should be a positive number'; valid = false; } else if (! frequencyUnit) { $scope.alerts.error = 'Frequency unit is required'; valid = false; } } if (valid) { $scope.disabled = true; var fields = {}; fields.name = $scope.newGame.name; fields.expiration = $scope.newGame.expiration && !$scope.newGame.neverending ? $scope.newGame.expiration.getTime() : undefined; fields.domain = $scope.newGame.domain; fields.notifyPCName = $scope.newGame.notifyPCName; if($scope.newGame.hideChallenges) { fields.challengeSettings = $scope.newGame.challengeSettings; } else { fields.challengeSettings = {}; } // Edit game gamesFactory.editGame($scope.game, fields).then( function (data) { // Settings edited $scope.game.name = $scope.newGame.name; $scope.game.expiration = data.expiration; $scope.game.domain = $scope.newGame.domain; $scope.game.challengeSettings = data.challengeSettings; $scope.game.notifyPCName = data.notifyPCName; $scope.alerts.settingsEdited = true; $scope.disabled = false; $rootScope.gameName = data.name; refreshHomeData(data); $scope.newGame.hideChallenges = isChallengesHidden($scope.game); $scope.newGame.challengeSettings = extractChallengeSettings($scope.game); if ($scope.new) { $scope.goToUrl('#/game/' + data.id); } }, function (message) { // Show given error alert $scope.alerts.editGameError = 'messages:' + message; $scope.disabled = false; } ); } }; const refreshHomeData = (game) => { $rootScope.games.forEach(g => { if(g.id == game.id) { g.name = game.name; } }); }; $scope.frequencyUnits = [ { label : "days", value : "DAY" }, { label : "hours", value : "HOUR" }, { label : "minutes", value : "MINUTE" } ]; // CANCEL button click event-handler $scope.cancel = function () { $scope.goto('concepts'); }; });
/* * @Description: * @Author: yamanashi12 * @Date: 2019-05-10 10:18:19 * @LastEditTime: 2020-04-26 10:10:22 * @LastEditors: Please set LastEditors */ import validator from '@/utils/validator' export default { baseData: { label: '名称', type: 'DetailImg', key: '', height: '200px', width: '200px', gap: 5, errorMsg: '暂无图片' }, rules: { label: [{ required: true, message: '请输入项目名称', trigger: 'blur' }], key: [ { required: true, message: '请输入字段名', trigger: 'blur' }, validator.rule.keyCode ] } }
export default { chatWithUs: "Chat with us", footerCredits: "Made by Joost De Cock & contributors with the financial support of our patrons ❤️ ", footerSlogan: "Freesewing is an open source platform for made-to-measure sewing patterns", joostFromFreesewing: "Joost from Freesewing", questionsJustReply: "If you have any questions, just reply to this E-mail. I'm always happy to help out. 🙂", signature: "Love,", signupActionText: "Confirm your E-mail address", signupCopy1: "Thank you for signing up at <b>freesewing.org</b>.<br><br>Before we get started, you need to confirm your E-mail address. Please click the link below to do that:", signupHeaderOpeningLine: "We're really happy you're joining the freesewing community.", signupHiddenIntro: "Let's confirm your E-mail address", signupSubject: "Welcome to freesewing.org", signupTitle: "Welcome aboard", signupWhy: "You received this E-mail because you just signed up for an account on freesewing.org", emailchangeActionText: "Confirm your new E-mail address", emailchangeCopy1: "You requested to change the E-mail address linked to your account at <b>freesewing.org</b>.<br><br>Before we do that, you need to confirm your new E-mail address. Please click the link below to do that:", emailchangeHeaderOpeningLine: "Just making sure we can reach you when needed", emailchangeHiddenIntro: "Let's confirm your new E-mail address", emailchangeSubject: "Please confirm your new E-mail address", emailchangeTitle: "Please confirm your new E-mail address", emailchangeWhy: "You received this E-mail because you changed the E-mail address linked to account on freesewing.org", passwordresetActionText: "Re-gain access to your account", passwordresetCopy1: "You forgot your password for your account at <b>freesewing.org</b>.<br><br>Click click the link below to reset your password:", passwordresetHeaderOpeningLine: "Don't worry, these things happen to all of us", passwordresetHiddenIntro: "Re-gain access to your account", passwordresetSubject: "Re-gain access to your account on freesewing.org", passwordresetTitle: "Reset your password, and re-gain access to your account", passwordresetWhy: "You received this E-mail because you requested to reset your password on freesewing.org", goodbyeCopy1: "If you'd like to share why you're leaving, you can reply to this message.<br>From our side, we won't bother you again.", goodbyeHeaderOpeningLine: "Just know that you can always come back", goodbyeHiddenIntro: "Thank you for giving freesewing a chance", goodbyeSubject: "Farewell 👋", goodbyeTitle: "Thank you for giving freesewing a chance", goodbyeWhy: "You received this E-mail as a final adieu after removing your account on freesewing.org", };
import React from 'react' export const Team = () => { var people = [ { name: "Everett Joseph, PhD", about: "Dr. Joseph is the Director of the The Center of Excellence in Weather Enterprise, as well as the Atmospheric Sciences Research Center at UAlbany, and is an internationally recognized leader in the field of atmospheric sciences. ", pic: 'img/team/Everett.jpg', job: "( Director )" }, { name: "Chris Thorncroft, PhD", about: "Dr. Thorncroft is Chair of the University at Albany’s Department of Atmospheric and Environmental Sciences, and an internationally recognized leader in the field of atmospheric sciences.", pic: 'img/team/Chris.jpg', job: "( Co-Director )" }, { name: "Colby Creedon, JD/MBA", about: "Mr. Creedon works to understand weather-related business problems and connect those problems with solutions developed by the University at Albany’s atmospheric sciences research team.", pic: 'img/team/Colby.jpg', job: "( Business Development Director )" } ] var items = people.map(person => { return ( <div className='item col-md-4'> <div className='team-item'> <div className='team-item-img'> <img src={person.pic} alt /> <div className='team-item-detail'> <div className='team-item-detail-inner light-color'> <h5>{person.name}</h5> <p style={{textAlign:'left'}}>{person.about}</p> <ul className='social'> <li><a href='https://www.facebook.com/' target='_blank'><i className='fa fa-facebook' /></a></li> <li><a href='https://www.twitter.com/' target='_blank'><i className='fa fa-twitter' /></a></li> <li><a href='https://www.dribbble.com/' target='_blank'><i className='fa fa-dribbble' /></a></li> <li><a href='https://www.pinterest.com/' target='_blank'><i className='fa fa-pinterest' /></a></li> <li><a href='https://www.behance.net/' target='_blank'><i className='fa fa-behance' /></a></li> </ul> </div> </div> </div> <div className='team-item-info'> <h6>{person.name}</h6> <p className>{person.job}</p> </div> </div> </div> ) }) return ( <section id='elements' className='section-padding text-center'> <div className='container'> <h2 className='page-title'>Our <span className='text-light'>Team</span></h2> </div> <div className='container'> <div className='row'> {items} </div> </div> </section> ) } export default Team
const { getInquiries } = require('../firebase/inquiries.firebase'); exports.inquiries = () => { return getInquiries(); };
import { StatusBar } from "expo-status-bar"; import React from "react"; import { ImageBackground, StyleSheet, Text, View } from "react-native"; import WelcomeScreen from "./app/screens/WelcomeScreen"; import Main from "./app/components/Main"; export default function App() { return <Main />; }
import React,{Component} from 'react' import Activities from './Activities' import Place from './Place' class Places extends Component{ constructor(props){ super(props); this.state ={ } } render(){ console.log(this.props.data) return( <div> <div> <Place info={this.props.data[this.props.index]} data={this.props.data} index={this.props.index} /> </div> {/* </div> */} <Activities/> </div> ) } } export default Places
const question = document.getElementById("question"); const choices = Array.from(document.getElementsByClassName("choice-text")); const progresstext = document.getElementById("progresstext"); const scoretext = document.getElementById('score'); const progressbarfull = document.getElementById('progressbarfull'); let currentquestion = {}; let acceptinganswers = false; let score = 0; let questioncounter = 0; let availablequestions = []; let questions = [ { question: "What is a productive cough?", choice1: "One that makes you feel better immediately", choice2: "One that results in cancer", choice3: "One that helps expel phlegm from the body", choice4: "One that causes other symptoms to appear", answer: 3 }, { question: "What are rales?", choice1: "Crossbars on a train track", choice2: "Abnormal lung sounds you can hear through a stethoscope", choice3: "Definitive indicators of lung cancer ", choice4: "Spasms of coughing", answer: 2 }, { question: "Who among these options is most likely to suffer from chronic bronchitis?", choice1: "People with childhood asthma", choice2: "People with deformed lungs", choice3: "People who have survived tuberculosis", choice4: "Smokers", answer: 4 }, { question: "What is another name for pertussis?", choice1: "Tuberculosis", choice2: "Whooping cough", choice3: "Bronchitis ", choice4: "Pneumonia", answer: 3 }, { question: "Perhaps unexpectedly, which of the following condition can be diagnosed because of a cough? ", choice1: "Gastrointestinal reflux disease", choice2: "Epilepsy", choice3: "Kidney disease", choice4: "Gout", answer: 1 } ];
import React from 'react'; import photo from './photo-couch.jpg'; const Main = () => <div className="container row" style = {{height:"100vh", color: "white"}}> <div className="main col-12"> <div className="row"> New Games and Accessories </div> <div className="row col-4"> <h1>Monthly packages. Excitement delivered daily.</h1> </div> <div className="row col-3"> <p>What's the best way to shop for the latest video games and peripherals? How about never shopping at all? You'll get new stuff on your doorstep - every month.</p> </div> <div className="row col-4"> <button className="start"><strong>GET STARTED</strong></button> </div> </div> </div> export default Main
import React from 'react'; import githubLogo from "../images/github-logo.png" import emailLogo from "../images/email-logo.png" import mediumLogo from "../images/medium-logo.png" import linkedInLogo from "../images/linked-in-logo.jpeg" import "../css/Contact.css" function Contact() { return ( <div id="contact-container"> <div id="contact-inner"> <h1 id="contact-heading">Contact</h1> <h3>Thank you for visiting. For more information:</h3> <table className="contact-table"> <tbody> <tr> <th><a href = "https://github.com/TimeSmash/mixit" target="_blank" rel="noopener noreferrer"><img src ={githubLogo} alt="github-link" ></img></a></th> <th>Visit this repo on Github</th> </tr> <tr> <th><a href = "https://www.linkedin.com/in/matthew-cummings-nyc/" target="_blank" rel="noopener noreferrer"><img src ={linkedInLogo} alt="github-link" ></img></a></th> <th>View my LinkedIn profile</th> </tr> <tr> <th><a href = "mailto:mcumm64@gmail.com" target="_blank" rel="noopener noreferrer"><img src ={emailLogo} alt="github-link" ></img></a></th> <th>Email me at mcumm64@gmail.com</th> </tr> <tr> <th><a href = "https://medium.com/@mc999" target="_blank" rel="noopener noreferrer"><img id= "medium-logo" src ={mediumLogo} alt="github-link" ></img></a></th> <th>Read my posts on Medium</th> </tr> </tbody> </table> </div> </div> ) } export default Contact;
var first = true; var currentID; var currentState; var start = 51; var playState; var ytapi = 'ytv3.php'; var store = window.localStorage; (function($) { $.fn.shuffle = function() { var allElems = this.get(), getRandom = function(max) { return Math.floor(Math.random() * max); }, shuffled = $.map(allElems, function() { var random = getRandom(allElems.length), randEl = $(allElems[random]).clone(true)[0]; allElems.splice(random, 1); return randEl; }); this.each(function(i) { $(this).replaceWith($(shuffled[i])); }); return $(shuffled); }; })(jQuery); // On Document Load $(function() { $(document).ready(function () { $('#intro').show(); if (window.playlist !== '') { getplaylist(window.playlist); } else if (store.getItem('currentPlaylist')) { getplaylist(store.getItem('currentPlaylist')); } else { getplaylist(); // Create new playlist } }); $('#controls').fadeIn(); $("#smallogo").tooltip({ placement: 'bottom' }); $("#sbtn001 img, #sbtn002 img, #btnGenEmail img, #newplaylist").tooltip({ placement: 'top' }); var subreddits = { 'futuregarage': 'Future Garage', 'futurebeats': 'Future Beats', 'dubstep': 'Dubstep', 'realdubstep': 'Real Dubstep', 'electronicmusic': 'Electronic Music', 'idm': 'IDM', 'music': 'Music', 'purplemusic': 'Purple Music', 'housemusic': 'House Music', 'deephouse': 'Deep House', 'swinghouse': 'Swing House', 'funk': 'Funk', 'listentothis': 'Listen To This', 'metal': 'Metal', 'indierock': 'Indie Rock', 'jazz': 'Jazz', 'hiphopheads': 'Hiphop Heads', 'chillmusic': 'Chill Music', 'slowjamz': 'Slow Jamz', 'classicalmusic': 'Classical', 'trance': 'Trance', 'trap': 'Trap', 'dnb': 'Drum N Bass', 'mashups': 'Mashups', 'mealtimevideos': 'Meal Time Videos', 'curiousvideos': 'Curious Videos', 'videos': 'Reddit Top Videos', 'documentaries': 'Documentaries', 'videoessay': 'Video Essays', 'artisanvideos': 'Artisan Videos', 'worldnewsvideo': 'World News Video', }; for (index in subreddits) { $("#dropdownMenu").append('<li><a href="#" class="btnReddit" ' + 'data-playlist="' + index + '">' + subreddits[index] + '</a></li>'); } var keys = Object.keys(subreddits); if (store.getItem('reddit_current')) { loadRedditPlaylist(store.getItem('reddit_current')); } else { loadRedditPlaylist(keys[ keys.length * Math.random() << 0]); } $("#playlistcontent").sortable({ placeholder: "ui-state-highlight", stop: shareit, }); $("#playlistcontent").disableSelection(); $("#dropdownMenu").on("click", ".btnReddit", function(e) { loadRedditPlaylist($(this).attr('data-playlist')); }); $('#recent').on("click", "a", function(event) { $('#txtSearch').attr("value", $(this).attr('data-href')); $('#btnSearch').click(); }); $("#grid").on("click", ".loadmore", function(event) { $('.loadmoreimg').attr('src', '/assets/images/load.gif'); scrolltothis = $('.loadmore').prev(); loadwhat = $('.loadmore').find('a').attr('href'); geturl = loadwhat + '&from=' + start; $.ajax({ url: geturl, success: function(data) { $('.loadmore').detach(); $('#grid').append(data); //$('#grid').scrollTo(scrolltothis, {duration: 700}); } }); start = start + 50; return false; }); $(document).on('click', '.video', function(event) { var id = $(this).data('videoid'); var title = $(this).children("a").text(); var duration = $(this).children(".duration").text(); $(this).children(".playoverlay").fadeOut('fast').fadeIn('fast'); addtoplaylist(id, title, duration, true, true, true); return false; }); $(document).on("click", ".playlistitem", function(event) { playid($(this).attr("data-id")); $("#playlistcontent li").removeClass('active'); $(this).parent().addClass('active'); }); $(document).on("click", ".playlistremove", function(event) { $(this).parent().remove(); shareit(); }); $('#grid').on("mouseenter", ".video", function(event) { $(this).children('.related').fadeIn(100); $(this).children('.playoverlay').fadeIn(100); }); $('#grid').on("mouseleave", ".video", function(event) { $(this).children('.related').hide(); $(this).children('.playoverlay').hide(); }); $('#playlistcontent').on("mouseenter", "li", function(e) { $(this).children('.playlistremove').css('display', 'block'); $(this).children('.related').css('display', 'block'); }); $('#playlistcontent').on("mouseleave", "li", function(e) { $(this).children('.playlistremove').css('display', 'none'); $(this).children('.related').css('display', 'none'); }); $('#grid,#playlistcontent').on("click", ".related", function() { var that = this; var htmlBefore = $(this).children("[data-href]").html(); $(this).children("[data-href]").html('<img src="/assets/images/miniloader.gif" />'); geturl = $(this).children("[data-href]").attr("data-href"); $.ajax({ url: geturl, success: function(data) { $('#grid').html(data); $('#grid').scrollTo($('#grid').children().first(), { duration: 500 }); $(that).children("[data-href]").html(htmlBefore); } }); return false; }); $("#playlistcode").click(function() { $(this).select(); }); $("#btnSearch,#btnPlaylistId").click(function() { if ($('#txtSearch').val() == '') { $('#txtSearch').attr('placeholder', 'Enter song or artist…'); $('#txtSearch').focus(); } else { $("#txtSearch").addClass("loading"); geturl = ytapi + '?action=search&q=' + encodeURIComponent( $('#txtSearch').val() ); $.ajax({ url: geturl, success: function(data) { $('#grid').empty(); $('#grid').html(data); $("#txtSearch").removeClass("loading"); // $('#grid').scrollTo($('#grid').children().first(), {duration: 500}); } }); } }); $('#btnAddAll').click(function (e) { $('.video').each(function (index, item) { addtoplaylist( $(item).data('videoid'), $(item).children('.title').text(), $(item).children('.duration').text(), false, false ) }) shareit(); e.preventDefault(); }); $("#txtSearch").keypress(function(e) { //Enter key if (e.which == 13) { $("#btnSearch").click(); return false; } }); $("#txtSearch").typeahead({ source: function(request, response) { $.getJSON("https://suggestqueries.google.com/complete/search?callback=?", { "hl": "en", // Language "ds": "yt", // Restrict lookup to youtube "jsonp": "suggestCallBack", // jsonp callback function name "q": request, // query term "client": "youtube" // force youtube style response, i.e. jsonp }); suggestCallBack = function(data) { var suggestions = []; suggestions.push($("#txtSearch").val()); $.each(data[1], function(key, val) { if (suggestions.indexOf(val[0]) === -1) suggestions.push(val[0]); }); response(suggestions); }; }, minLength: 1, items: 15, autoSelect: false, afterSelect: function (something) { $("#txtSearch").val(something); $("#btnSearch").click(); }, }); $("#btnRelated").click(function() { $.ajax({ url: ytapi + '?action=related&id=' + currentID, success: function(data) { $('#grid').empty(); $('#grid').html(data); $("#txtSearch").removeClass("loading"); } }); }); $('#pauseplay').click(function() { if (currentState == 1) { ytPlayer.pauseVideo() } else { ytPlayer.playVideo(); } }); $("#previous").click(function() { if ($('#playlistcontent li.active').length == 0) { $('#playlistcontent li').first().find("a").click(); } else { $('#playlist').scrollTo($('#playlistcontent li.active').prev().find("a"), { duration: 100 }); $('#playlistcontent li.active').prev().find("a").click(); } }); $("#next").click(function() { if ($('#playlistcontent li.active').length == 0) { $('#playlistcontent li').first().find("a").click(); } else { $('#playlist').scrollTo($('#playlistcontent li.active').next().find("a"), { duration: 100 }); $('#playlistcontent li.active').next().find("a").click(); } }); $('#shuffle').click(function() { $('#playlist ul li').shuffle(); }); $('#clear').click(function() { $('#playlist ul li').remove(); }); $('#txtSearch').focus(); $('#copylink').click(function (e) { copyLink('playlistcode'); e.preventDefault(); }) $("#newplaylist").click(function (e) { getplaylist(null, function () { location.reload(); }); e.preventDefault(); }); }); function copyLink(inputId) { var copyText = document.getElementById(inputId); copyText.select(); copyText.setSelectionRange(0, 99999); /* For mobile devices */ document.execCommand("copy"); } function onPlayerReady(event) { event.target.playVideo(); ytPlayer.addEventListener("onStateChange", "ytState"); } function onPlayerStateChange(event) { if (event.data == 0) { if (($('#playlistcontent li').length == 0) || ($('#playlistcontent li').length == 1)) { // Don't do anything } else { if ($('#playlistcontent li.active').length == 0) { $('#playlistcontent li').first().find("a").click(); } else { $('#playlist').scrollTo($('#playlistcontent li.active').next().find("a"), { duration: 500 }); $('#playlistcontent li.active').next().find("a").click(); } } } currentState = event.data; if (event.data == 1) { ytPlayer.setPlaybackQuality('hd720'); } } $(document).on("click", "#btnFavorites", function(event) { if ($('#txtSearch').val() == '') { $('#txtSearch').attr('placeholder', 'Enter username…'); $('#txtSearch').focus(); } else { $("#txtSearch").addClass("loading"); $.ajax({ url: ytapi + '?action=userfavorites&user=' + $('#txtSearch').val(), success: function(data) { $('#grid').empty(); $('#grid').html(data); $("#txtSearch").removeClass("loading"); $('#grid').scrollTo($('#grid').children().first(), { duration: 500 }); } }); } }); $(document).on("click", "#btnUploads", function(event) { if ($('#txtSearch').val() == '') { $('#txtSearch').attr('placeholder', 'Enter username…'); $('#txtSearch').focus(); } else { $("#txtSearch").addClass("loading"); if (first == true) { $('#player').show(); $('#playlist').show(); $('#intro').fadeOut('fast'); } $.ajax({ url: ytapi + '?action=useruploads&user=' + $('#txtSearch').val(), success: function(data) { $('#grid').empty(); $('#grid').html(data); $("#txtSearch").removeClass("loading"); $('#grid').scrollTo($('#grid').children().first(), { duration: 500 }); } }); } }); $('li').click(function(event) { event.stopPropagation(); }); function playid(id) { currentID = id; if (first === true) { $("body").removeClass('first-time'); if ((typeof YT !== 'object') || (typeof YT.Player !== 'function')) { console.log('YouTube library not loaded'); setTimeout(function () { playid(id) }, 500); return; } first = false; ytPlayer = new YT.Player('player', { height: '390px', width: '250px', playerVars: { 'autoplay': 1, 'autohide': 1, 'theme': 'light', 'color': 'red', 'iv_load_policy': '3', 'showinfo': '0' }, videoId: id, events: { 'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange } }); $('#playlistcontrols').fadeIn('fast'); } else { if (typeof ytPlayer == 'undefined') { console.log('ytPlayer not loaded'); setTimeout(function () { playid(id) }, 500); return; } ytPlayer.loadVideoById(id, 0, 'large'); } $('li.active').removeClass("active"); $('#' + id).addClass('active'); setCookie('item', id); } /* -1 (unstarted) 0 (ended) 1 (playing) 2 (paused) 3 (buffering) 5 (video cued). */ function addtoplaylist(id, title, duration, share, animate, playfirst) { try { playState = ytPlayer.getPlayerState(); } catch (e) { playState = 9; } var item = $( '<li id="' + id + '" title="' + title + ' (' + duration + ')">' + '<button class="btn btn-xs btn-default related" style="display:none;">' + '<span data-href="ytv3.php?action=related&id=' + id + '">' + '<i class="glyphicon glyphicon-search"></i> Related</span>' + '</button>' + '<button class="btn btn-xs btn-danger playlistremove">' + '<i class="glyphicon glyphicon-remove"></i>' + '</button>' + '<a class="playlistitem" href="#" data-id="' + id + '">' + '<img width="40" height="30" class="playlistimg" src="https://i.ytimg.com/vi/' + id + '/1.jpg" />' + '' + title + ' <span class="duration">(' + duration + ')</span>' + '</a>' + '</li>' ); if (animate) { $('#playlistcontent').append(item.hide().fadeIn()); } else { $('#playlistcontent').append(item); } if (share) { shareit(); } var shouldPlay = playfirst && playState !== 1 && (playState === -1 || playState === 0 || playState === 2 || playState === 9); if (shouldPlay) { playid(id, title); } } function shareit() { playlistarray = {}; $(".playlistitem").each(function(index) { playlistarray[$(this).attr('data-id')] = $(this).text(); }); var playlistJSON = JSON.stringify(playlistarray); var query = '' var playlistId = store.getItem('currentPlaylist'); var playlistPassword = store.getItem('password_' + playlistId); if (playlistId && playlistPassword) { query = '&playlist_id=' + encodeURIComponent(playlistId) + '&playlist_password=' + encodeURIComponent(playlistPassword); } $.ajax({ type: 'POST', url: '/store.php?action=store' + query, data: 'playlistdata=' + escape(playlistJSON), success: function(data) { updateCurrentPlaylist(data.playlist_id, data.password); } }); } function updateCurrentPlaylist(playlistId, playlistPassword) { updateShareLinks(playlistId); // Update current URL, if user came from a shared URL history.pushState(null, document.title, '/' + playlistId); store.setItem('currentPlaylist', playlistId); if (playlistPassword) { store.setItem('password_' + playlistId, playlistPassword); } } function updateShareLinks(playlistId) { var shareUrl = "https://instadj.com/" + playlistId; $("#playlistcode").attr("value", shareUrl); $("#sbtn001 a").attr("href", "https://facebook.com/sharer/sharer.php?u=" + encodeURIComponent(shareUrl)); $("#sbtn002 a").attr("href", "https://www.twitter.com/intent/tweet?text=" + "Check%20out%20my%20InstaDJ%20playlist." + "&url=" + encodeURIComponent(shareUrl)); $("#btnGenEmail").attr("href", "mailto:?subject=Check out my playlist" + "&body=Hi, I made a playlist and thou" + "ght you might like it: " + encodeURIComponent(shareUrl)); } function loadRedditPlaylist(subreddit) { $("#txtSearch").addClass("loading"); $.ajax({ url: 'reddit.php?reddit=' + subreddit, success: function(data) { $('#grid').empty(); $.ajax({ url: ytapi + '?action=videoids&ids=' + data.youtube_ids.join(','), success: function(data) { $('#grid').empty(); $('#grid').html(data); $("#txtSearch").removeClass("loading"); store.setItem('reddit_current', subreddit); } }); } }); } function getplaylist(id, callback) { $.ajax({ dataType: 'json', url: 'store.php?action=get&id=' + (id ? id : ''), success: function(data) { if (data.error) { alert('Error when loading playlist "' + id + '": ' + data.code + '.'+ '\nPlease contact simon@fredsted.me or @fredsted on Twitter for assistance.'); } else { $("#playlistcode").attr("value", 'https://instadj.com/' + id); for (var videoId in data.videos) { if (data.videos.hasOwnProperty(videoId)) { addtoplaylist( videoId, data.videos[videoId]['title'], data.videos[videoId]['duration'], false, false, false ); } } var cookieId = getCookie('item'); var playlistIds = Object.keys(data.videos); if (cookieId && playlistIds.indexOf(cookieId) !== -1) { playid(cookieId); } else if (playlistIds.length > 0) { playid(playlistIds[0]); } updateCurrentPlaylist(data.playlist_id, data.password); if (callback) { callback(data.playlist_id); } $("#intro").hide(); } } }); } function setCookie(name, value, days) { var expires = ""; if (days) { var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toUTCString(); } document.cookie = name + "=" + (value || "") + expires + "; path=/"; } function getCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length); } return null; } if (typeof window.localStorage.currentPlaylist === 'undefined' && getCookie('currentPlaylist') !== null) { window.localStorage.currentPlaylist = getCookie('currentPlaylist'); } if (typeof window.localStorage.currentPlaylist === 'string' && getCookie('currentPlaylist') === null) { setCookie('currentPlaylist', window.localStorage.currentPlaylist); }
bridge.controller('ApplicationController', ['$scope', '$rootScope', '$location', '$humane', '$window', 'authService', 'modalService', 'signInService', function($scope, $rootScope, $location, $humane, $window, authService, modalService, signInService) { $rootScope.loading = 0; $rootScope.$on("loadStart", function() { $rootScope.loading++; }); $rootScope.$on("loadEnd", function() { $rootScope.loading--; }); var DEFAULT_PATHS = ["","/","index.html","/index.html"]; $scope.session = authService; $scope.tabs = [ {link: '#/health', label: "My Health"}, {link: '#/questions', label: "Questions"}, {link: '#/journal', label: "Journal"}, {link: '#/research', label: "Researcher's Journal"} ]; $scope.tabClass = function(tab) { var path = $location.path(); if (path.indexOf("/tracker/") > -1) { path = "/health"; } if (DEFAULT_PATHS.indexOf(path) > -1) { path = "/research"; } return (tab.link.indexOf(path) > -1); }; $scope.signIn = function() { signInService.open(); }; $scope.signUp = function() { modalService.openModal('SignUpModalController', 'lg', 'views/dialogs/signUp.html'); }; $scope.signOut = function() { authService.signOut().then(function() { $window.location.replace("/"); }, $humane.status); }; $scope.resetPassword = function() { modalService.openModal('RequestResetPasswordModalController', 'sm', '/shared/views/requestResetPassword.html'); }; }]);
const express = require("express"); const app = express(); app.get("/", (req, res) => res.send("nodejs week2 homework")); app.get("/numbers/add", (request, response) => { console.log(request.query); const firstNumber = parseFloat(request.query.first); const secondNumber = parseFloat(request.query.second); const sum = firstNumber + secondNumber; if (isNaN(sum)) { response.status(400).json({ error: "Input must be number" }); return } else { response.send(`${sum}`); } }) app.get("/numbers/multiply/:first/:second", (request, response) => { console.log(request.query); const firstNumber = parseFloat(request.params.first); const secondNumber = parseFloat(request.params.second); const multiple = firstNumber * secondNumber; if (isNaN(multiple)) { response.status(400).json({ error: "Input must be number" }) return } else { response.send(`${multiple}`); } }); app.listen(3000, () => console.log(`Calculator:listening on port 3000`));
import React from "react"; import NotFoundPage from "../../components/pages/NotFound"; function NotFoundContainer() { return <NotFoundPage />; } export default NotFoundContainer;
/** * Created by Administrator on 2016/9/1. */ //插件编写 $(document).ready(function() { $.fn.extend({ "color": function (value) { $("#banner_bg").color("red"); } }); }); var curIndex = 0; //var currentIndex = $(this).index(); var targetIndex = 0; var t = null; function autoClick(){ targetIndex = curIndex + 1; if(targetIndex > $("#banner_list img").length - 1){targetIndex = 0;} $("#banner ul li").eq(targetIndex).trigger('click'); } ////插件应用 $(document).ready(function(){ //初始化 var $bannerImg = $("#banner_list img"); $("#banner ul li").click(function(){ console.log(targetIndex); targetIndex = $(this).index(); if(targetIndex == curIndex){return;} curIndex = targetIndex; var targetImg = $bannerImg.eq(targetIndex); $bannerImg.not(targetImg).hide(); $bannerImg.eq(targetIndex).fadeIn(500); $("#banner_info").text($bannerImg.eq(targetIndex).attr("title")); $(this).parent().find("li").removeClass("on"); $(this).parent().find("li").eq(targetIndex).addClass("on"); }); t = setInterval("autoClick()", 500); $(".gou").mouseenter(function(){ clearInterval(t); t = null; }).mouseleave(function(){ t = setInterval("autoClick()", 500); }); });
export function getToken(ctx) { const header = ctx.request.header["x-access-token"]; if (!header) { return null; } return header; }
import React from "react"; import styled from "styled-components"; import { faAngleDown } from "@fortawesome/free-solid-svg-icons" import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; const ArrowContainer = styled.div` width: 33px; height: 33px; border-radius: 50%; background-color: rgba(113, 113, 113, 0.87); display: flex; justify-content: center; align-items: center; cursor: pointer; border: 2px solid transparent; transition: all 255ms ease-in-out; margin-top: 15px; &:hover { border: 2px solid yellow; } `; const ArrowIcon = styled.div` color: yellow; font-size: 22px; `; export function ScrollDown(props) { return ( <ArrowContainer> <ArrowIcon> <FontAwesomeIcon icon = { faAngleDown } /> </ArrowIcon> </ArrowContainer> ); }
/** * Created with IntelliJ IDEA. * User: Administrator * Date: 13-7-2 * Time: 上午10:24 * @fileoverview html5播放器 */ define(function(require, exports, module) { var juicer = require('juicer'); var Ajax = require('ajax'); var Player = Backbone.View.extend({ TIMEOUT : 5000, //隔5s controls自动消失 controlsShowing : true, tpl : ['<div class="controls">', '<div class="progressbar_bg">', '<div class="progressbar">', '<div class="track"></div>', '<div class="handle" draggable="true"></div>', '</div>', '</div>', '<div class="player_buttons">', '<a class="fl player_button start" href="javascript:void(0)"><span>开始/暂停</span></a>', '<div class="fl time"><span class="current">00:00</span>|<span class="duration">{{duration|formatTime}}</span></div>', '<a class="fr player_button fullscreen" href="javascript:void(0)"><span>全屏/退出全屏</span></a>', '<div class="fr controls_playmode">', '{@if hcVideoUrl}<a class="fl player_button hc active" data-mode="hc" href="javascript:void(0)">流畅</a>{@/if}', '{@if hdVideoUrl}<a class="fl player_button hd" data-mode="hd" href="javascript:void(0)">高清</a>{@/if}', '{@if heVideoUrl}<a class="fl player_button he" data-mode="he" href="javascript:void(0)">超清</a>{@/if}', '</div>', '</div>', '</div>', '</div>'].join(''), options : { videoId : 531656, playerId : 192073//不支持 }, initialize : function(options) { juicer.register('formatTime', this.formatTime); this.$el.addClass('player_html5'); var context = this; context.$video = context.$el.find('video'); context.video = context.$video[0]; context.video.controls = false; context.options = $.extend(context.options, options); context.duration = context.options.duration * 1; $(juicer.to_html(context.tpl, context.options)).appendTo(context.$el); context.$controls = context.$el.find('.controls'); context.$progressbar = context.$el.find('.progressbar'); context.$track = context.$el.find('.track'); context.$handle = context.$el.find('.handle'); context.$play = context.$el.find('.start'); context.$duration = context.$el.find('.duration'); context.$current = context.$el.find('.current'); context.$fullscreen = context.$el.find('.fullscreen'); context.$playmode = context.$el.find('.controls_playmode'); var $progressbarWidth = context.$progressbar.width() - 10;//减掉padding context.$handleWidth = context.$handle.width() - 3;//变成偶数 context.$progressbar.css('width', $progressbarWidth + 'px'); context.maxHandelLeft = $progressbarWidth - context.$handleWidth; context.maxTrackWidth = $progressbarWidth; context.bind(); context.fadeTimer = setTimeout(function() { context.fadeOut(); }, context.TIMEOUT); }, bind : function() { var context = this, $doc = $(document.body); var cantouch = "ontouchend" in document; if (cantouch) { this.$el.on('touchstart', function(e) { if (context.video.paused || context.video.ended) { return; } if (context.controlsShowing) { context.fadeOut(); } else { context.fadeIn(); } }); this.$el.on('touchend', function() { if (context.controlsShowing) { context.fadeTimer = setTimeout(function() { context.fadeOut(); }, context.TIMEOUT); } }); } this.$el.on({ 'mouseenter' : $.proxy(this.fadeIn, this), 'mouseleave' : $.proxy(this.fadeOut, this) }); this.video.addEventListener('play', $.proxy(this.onPlay, this), false); this.video.addEventListener('pause', $.proxy(this.onPause, this), false); this.video.addEventListener('ended', $.proxy(this.onPause, this), false); this.video.addEventListener('durationchange', function() { context.duration = context.video.duration; context.$duration.text(context.formatTime(context.duration)); }, false); this.video.addEventListener('timeupdate', $.proxy(this.onTimeupdate, this), false); //this.video.addEventListener('webkitfullscreenchange', this.onFullscreen.bind(this), false); /**************用户事件***********/ this.$controls.on('touchstart', function(e) { if (context.controlsShowing) { clearTimeout(context.fadeTimer); e.stopPropagation(); } }); //播放暂停 this.$play.on('click', function(e) { if (context.video.paused) { context.video.play(); } else if (context.video.ended) { context.video.currentTime = 0; context.video.play(); } else { context.video.pause(); } }); //全屏 var fullScreened = false; var enterFullScreen = function() { fullScreened = true; context.$fullscreen.addClass('fullscreen_esc'); context.$el.addClass('player_fullscreen'); $doc.css({ 'height' : '100%', 'overflow' : 'hidden' }); var $win = $(window); $(context.video).css({ 'width' : $win.width(), 'height' : $win.height() }) }; var exitFullScreen = function() { fullScreened = false; context.$fullscreen.removeClass('fullscreen_esc'); context.$el.removeClass('player_fullscreen'); $doc.css({ 'height' : 'auto', 'overflow' : 'visible' }); $(context.video).css({ 'width' : this.options.width, 'height' : this.options.height }) }; this.$fullscreen.on('click', function(e) { var video = document.createElement('video'); if (video.webkitEnterFullScreen) { context.video.webkitEnterFullScreen(); } else if (video.mozRequestFullScreen) { context.video.mozRequestFullScreen(); } else if (video.requestFullScreen) {//和下面的只有S大小写区别,小写为W3C context.video.requestFullScreen(); } else if (video.requestFullscreen) { context.video.requestFullscreen(); } else {//不支持全屏APi的IE10 if (!fullScreened) { $doc.off('keyup').on('keyup', function(event) { if (event.code == 27) {//按esc键 if (fullScreened) { exitFullScreen(); } } }); enterFullScreen(); } else { exitFullScreen(); } } }); //拖拽 this.$handle[0].addEventListener((cantouch) ? 'touchstart' : 'mousedown', function(e) { e = (e.touches && e.touches.length > 0) ? e.touches[0] : e; context.onDragStart(e); }); $doc[0].addEventListener((cantouch) ? 'touchend' : 'mouseup', function(e) { e = (e.touches && e.touches.length > 0) ? e.touches[0] : e; context.onDrop(e); }); $doc[0].addEventListener((cantouch) ? 'touchmove' : 'mousemove', function(e) { e = (e.touches && e.touches.length > 0) ? e.touches[0] : e; context.onDrag(e); }); //定位 this.$progressbar.on('click', function(e) { var posX = e.pageX - context.$progressbar.offset().left - context.$handleWidth * .5; context.$handle.css('left', posX + 'px'); var percent = posX / context.maxHandelLeft; context.video.currentTime = Math.floor(context.duration * percent); context.video.play(); }); //清晰度 var $playmodes = this.$playmode.find('a'); this.$playmode.on('click', 'a', function(evt) { var target = $(evt.target); if (target.hasClass('active')) { return; } $playmodes.removeClass('active'); target.addClass('active'); var playMode = target.data('mode'); context.onChangePlayMode(playMode); }); }, onChangePlayMode : function(playMode) { var context = this; var currentTime = context.video.currentTime * 1; var flvUrl = context.options[playMode + 'VideoUrl'] + '&rd=html5'; if (flvUrl) { var continuePlay = function() { context.video.removeEventListener('canplay', continuePlay, false); setTimeout(function() { context.video.currentTime = currentTime; context.video.play(); }, 1000);//延迟1s }; context.video.addEventListener('canplay', continuePlay, false); context.$video.attr('src', flvUrl); context.$video.find('source').attr('src', flvUrl); context.video.load(); } }, onDragStart : function(e) { e.preventDefault && e.preventDefault();//ipad不支持preventDefault this.dragstart = true; this.handlePosX = e.pageX - this.$handle.position().left; }, onDrag : function(e) { e.preventDefault && e.preventDefault(); if (this.dragstart) { var posX = e.pageX - this.$progressbar.position().left - this.handlePosX; if (posX < 0 || posX > this.maxHandelLeft) { return; } this.$handle.css('left', posX + 'px'); } }, onDrop : function(e) { if (this.dragstart) { this.dragstart = false; var left = this.$handle.position().left; var percent = left / this.maxHandelLeft; this.video.currentTime = Math.floor(this.duration * percent); this.video.play(); } }, fadeIn : function() { clearTimeout(this.fadeTimer); this.controlsShowing = true; this.$controls.fadeIn(); }, fadeOut : function() { if (this.video.paused || this.video.ended) { return; } clearTimeout(this.fadeTimer); this.controlsShowing = false; this.$controls.fadeOut(); }, onPlay : function() { this.$play.attr('class', this.$play.attr('class').replace('start', 'pause')); }, onPause : function() { this.$play.attr('class', this.$play.attr('class').replace('pause', 'start')); this.fadeIn(); }, onTimeupdate : function() { var currentTime = this.video.currentTime; this.$current.text(this.formatTime(currentTime)); if (!this.dragstart) { var percent = currentTime / this.duration; var width = Math.ceil(percent * this.maxTrackWidth), left = Math.ceil(percent * this.maxHandelLeft); this.$track.css('width', width + 'px'); this.$handle.css('left', left + 'px'); } }, formatTime : function(time) { time = Math.round(time); var sec = time % 60, min = Math.floor(time / 60); return ("0" + min).substr(-2) + ":" + ("0" + sec).substr(-2); }, onFullscreen : function() { //this.$fullscreen.toggleClass('fullscreen_esc'); } }); function H5player(element, options) { options = options || {}; options.el = element; return new Player(options); } return H5player; });
/* Print odds 1-20 Print out all odd numbers from 1 to 20 The expected output will be 1, 3, 5, 7, 9, 11, 13, 15, 17, 19 */ for(i=1;i<=20;i++){ if(i % 2 != 0){ console.log(i); } } /* Sum and Print 1-5 Sum numbers from 1 to 5, printing out the current number and sum so far at each step of the way The expected output will be: Num: 1, Sum: 1, Num: 2, Sum: 3, Num: 3, Sum: 6, Num: 4, Sum: 10, Num: 5, Sum: 15 */ var sum = 0 for(i=1;i<=5;i++){ console.log(i); sum += i; console.log(sum); }
let { expect } = require("chai"); let mathEnforcer = require("./mathEnforcer"); describe("mathEnforcer", () => { describe("addFive", () => { it("should return correct number when input is valid", () => { expect(mathEnforcer.addFive(4)).to.equal(9); expect(mathEnforcer.addFive(-4)).to.equal(1); expect(mathEnforcer.addFive(1.999)).to.equal(1.999 + 5); }); it("should return undefined when input is not valid", () => { expect(mathEnforcer.addFive("5")).to.equal(undefined); expect(mathEnforcer.addFive([5])).to.equal(undefined); expect(mathEnforcer.addFive(true)).to.equal(undefined); expect(mathEnforcer.addFive(undefined)).to.equal(undefined); expect(mathEnforcer.addFive(null)).to.equal(undefined); }); }); describe("subtractTen", () => { it("should return correct number when input is valid", () => { expect(mathEnforcer.subtractTen(4)).to.equal(-6); expect(mathEnforcer.subtractTen(-2)).to.equal(-12); expect(mathEnforcer.subtractTen(10.001)).to.equal(10.001 - 10); }); it("should return undefined when input is not valid", () => { expect(mathEnforcer.subtractTen("5")).to.equal(undefined); expect(mathEnforcer.subtractTen([5])).to.equal(undefined); expect(mathEnforcer.subtractTen(true)).to.equal(undefined); expect(mathEnforcer.subtractTen(undefined)).to.equal(undefined); expect(mathEnforcer.subtractTen(null)).to.equal(undefined); }); }); describe("sum", () => { it("should return correct sum when both numbers are valid", () => { expect(mathEnforcer.sum(2, -8)).to.equal(-6); expect(mathEnforcer.sum(0, 0)).to.equal(0); expect(mathEnforcer.sum(-5, -5)).to.equal(-10); expect(mathEnforcer.sum(10.0001, 1.009)).to.equal(10.0001 + 1.009); }); it("should return undefined when one or both numbers are not valid", () => { expect(mathEnforcer.sum("6", 3)).to.equal(undefined); expect(mathEnforcer.sum([])).to.equal(undefined); expect(mathEnforcer.sum([6, 6])).to.equal(undefined); expect(mathEnforcer.sum(0, null)).to.equal(undefined); expect(mathEnforcer.sum(["", "4"])).to.equal(undefined); expect(mathEnforcer.sum(true, 0)).to.equal(undefined); }); }); });
const AWS = require('aws-sdk'); const handleResponse = require('./handleResponse'); // A function to create a random sort key and appends the activity type on the end function createSortKey(activityType) { let randomNum = ''; const characters = '0123456789'; for (let i = 0; i < 13; i += 1) { randomNum += characters.charAt(Math.floor(Math.random() * 10)); } const sortKey = randomNum.concat('_', activityType); return sortKey; } // Function that controls the Get, Post and Delete operations on the db function docClientController() { const docClient = new AWS.DynamoDB.DocumentClient(); const table = 'DogCollarData'; const handle = handleResponse(); const queryObj = {}; // Retrieves a specific db enrty based on Partiton and Sort keys function get(req, res) { if (req.query.partitionKey && req.query.sortKey) { queryObj.partitionKey = req.query.partitionKey; queryObj.sortKey = req.query.sortKey; const params = { TableName: table, Key: { partitionKey: queryObj.partitionKey, sortKey: queryObj.sortKey, }, }; docClient.get(params, (err, data) => { if (err) { handle.handleError(err, res); } else { handle.handleSuccess(data.Item, res); } }); } else { res.json({ message: 'Partition Key and Sort Key params required', statusCode: 400 }); } } // TODO - Flesh out further querying routes // function query(req, res) { // if (req.body.partitionKey && req.query.bottom && req.query.top) { // const params = { // TableName: table, // KeyConditionExpression: '#pk = :key and #d between :top and :bottom', // ExpressionAttributeNames: { // '#pk': 'partitionKey', // '#d': 'duration' // }, // ExpressionAttributeValues: { // ':key': req.body.partitionKey, // ':bottom': req.query.bottom, // ':top': req.query.top // } // }; // docClient.query(params, (err, data) => { // if (err) { // handle.handleError(err, res); // } else { // handle.handleSuccess(data.Item, res); // } // }); // } else { // res.json({ // message: 'Activity Type and Duration params Range Required', // statusCode: 400 // }); // } // } // Function that checks the requst object, adds timestamp and sort key and posts it to the db function post(req, res) { const currentDate = new Date().toISOString(); if ( req.body.partitionKey && req.body.activityType && req.body.actionData ) { const request = {}; request.createdAt = currentDate; request.partitionKey = req.body.partitionKey; request.activityType = req.body.activityType; request.sortKey = createSortKey(request.activityType); request.actionData = req.body.actionData; if (request.activityType === 'LOCATION' && (request.actionData.location.lat) && (request.actionData.location.long)) { request.actionData.location = req.body.actionData.location; } else if ((request.activityType === 'PHYSICAL_ACTIVITY' || request.activityType === 'BARK') && request.actionData.duration) { request.actionData.duration = req.body.actionData.duration; } else { res.json({ message: 'Invalid request object', statusCode: 400 }); } const params = { TableName: 'DogCollarData', Item: request }; docClient.put(params, (err) => { if (err) { handle.handleError(err, res); } else { handle.handlePostSuccess(res); } }); } else { res.json({ message: 'Invalid request object', statusCode: 400 }); } } // A function that removes a specific db entry bases on Partition and Sort Keyss function remove(req, res) { if (req.query.partitionKey && req.query.sortKey) { queryObj.partitionKey = req.query.partitionKey; queryObj.sortKey = req.query.sortKey; const params = { TableName: table, Key: { partitionKey: queryObj.partitionKey, sortKey: queryObj.sortKey, }, }; docClient.delete(params, (err, data) => { if (err) { handle.handleError(err, res); } else { handle.handleSuccess(data.Item, res); } }); } else { res.json({ message: 'Partition Key and Sort Key required', statusCode: 400 }); } } return { get, post, remove }; } module.exports = docClientController;
import '../../styles/LoginFail.css'; import React from 'react'; import useFormState from '../hooks/useFormState'; import LandingNav from '../layout/LandingNav'; import { connect } from 'react-redux'; import { login } from '../../actions/auth'; import PropTypes from 'prop-types'; import { Redirect } from 'react-router-dom'; const LoginFail = ({ login, isAuthenticated }) => { const [email, setEmail] = useFormState(''); const [password, setPassword] = useFormState(''); const onSubmit = (e) => { e.preventDefault(); login({ email, password }); }; if (isAuthenticated) { return <Redirect to="/home" />; } return ( <div> <LandingNav /> <div className="container"> <div className="login-fail d-flex justify-content-center align-items-center"> <div className="col-lg-5 ml-lg-5"> <h3>Log in to MovieCity</h3> <p className="text-danger"> The email and password you entered do not match our records. Please double-check and try again. </p> <form onSubmit={onSubmit}> <div className="form-group py-1"> <input className="form-control" type="email" name="email" id="email" placeholder="Email" onChange={setEmail} /> </div> <div className="form-group py-1"> <input className="form-control" type="password" name="password" id="password" placeholder="New Password" onChange={setPassword} /> </div> <button className="btn btn-success btn-block" type="submit"> Log in </button> </form> </div> </div> </div> </div> ); }; LoginFail.propTypes = { login: PropTypes.func.isRequired, isAuthenticated: PropTypes.bool.isRequired, }; const mapStateToProps = (state) => ({ isAuthenticated: state.auth.isAuthenticated, }); export default connect(mapStateToProps, { login })(LoginFail);
import { Link, Switch, Route } from "react-router-dom"; function MeseroPage() { //'path' nos permite construir rutas relativas <Route> , mientras que 'url' nos permite construir enlaces relativos<Link>o<NavLink> return ( <div> <h1>Menú del Mesero</h1> <ul> <li> <Link to="/mesero/carta">Carta</Link> </li> <li> <Link to="/mesero/nuevopedido">Nuevo Pedido</Link> </li> <li> <Link to="/mesero/estadodepedido">Estado de Pedido</Link> </li> </ul> <Switch> <Route> </Route> </Switch> </div> ); } export default MeseroPage;
import React from 'react'; import styled, {createGlobalStyle} from 'styled-components'; import AudReviewList from './Components/FakeAudReviews.jsx'; const ARGlobalStyle = createGlobalStyle` div #app { line-height: 1.5; color: #212529; text-align: left; font-family: Arial, Helvetica, sans-serif; box-sizing: border-box; width: 800px; margin: 10px auto; } `; const AppWrapper = styled.div` display: flex; flex-wrap: wrap; justify-content: flex-end; width: 800px; padding: 0px; `; const TitleBackground = styled.h1` display:inline-flex; background: #FA320A; width: 100%; height: 22px; align-items: center; margin-bottom: 0px; `; const Title = styled.div` display: flex; white-space: nowrap; font-size: 24px; font-family: Neusa Next Pro Compact Medium, Impact, Arial, sans-serif; width: 100%; margin-bottom: 10px; margin-top: 10px; margin-left: 25px; margin-right: 60%; padding-left: 10px; padding-right: 20px; background-color: white; color: #2A2C32; `; const ReviewWrapper = styled.ul` display: flex; list-style: none; flex-direction: column; margin-top: 0px; padding: 0px; `; const ReviewList = styled.div` display: inline; column-count: 2; column-fill: balance; column-gap: 50px; position: relative; width: 100%; margin-top: 20px; `; const ButtonContainer = styled.span` display: inline-block; margin: 25px; text-align: right; `; const Button = styled.button` display: flex; border: none; color: dodgerblue; text-decoration: none; font-family: Arial,sans-serif; font-size: 14px; outline: none; &:hover { text-decoration: none; cursor: pointer; } `; class App extends React.Component { constructor(props) { super(props); this.state = { movieName: '', topFour: [], movieReviews: [], text: 'See all Audience reviews', expanded: false, isLoaded: false }; this.getAudienceReviews = this.getAudienceReviews.bind(this); this.expandCollapse = this.expandCollapse.bind(this); } getAudienceReviews() { var url = this.state.movieName; fetch('ec2-13-57-223-10.us-west-1.compute.amazonaws.com:8080/api/audienceReviews') .then(list => list.json()) .then(returned => this.setState({ movieName: returned[Math.floor(Math.random()*100)].reviewMovie, movieReviews: returned })) .then(() => this.setState({ movieReviews: this.state.movieReviews.filter(review => review.reviewMovie === this.state.movieName) })) .then(() => this.setState({ topFour: this.state.movieReviews.slice(0,4) })) .then(() => this.setState({ isLoaded: true })) } expandCollapse() { this.state.expanded === true ? this.setState({ text: 'See all Audience reviews' }) : this.setState({ text: 'See less Audience reviews' }) this.setState({ expanded: !this.state.expanded }); } componentDidMount() { this.getAudienceReviews() } render () { var noSpaceTitle = this.state.movieName.toUpperCase().replace(/-/g, ' '); return ( <AppWrapper> <ARGlobalStyle /> <TitleBackground><Title>AUDIENCE REVIEWS FOR <em> &nbsp;{noSpaceTitle}</em></Title></TitleBackground> <ReviewWrapper> <ReviewList> {this.state.isLoaded ? <AudReviewList someReviews={this.state.expanded ? this.state.movieReviews : this.state.topFour}/> : null} </ReviewList> </ReviewWrapper> <ButtonContainer><Button onClick={this.expandCollapse}>{this.state.text}</Button></ButtonContainer> </AppWrapper> ) } } export default App;
// wishlist.js to handle wishlist functionality var Wishlist = {} ; Wishlist.init = function() { Wishlist.NewWishListInputValidationHandler(); } /** * This method handles the validation of the NewWishList input and its according radio button */ Wishlist.NewWishListInputValidationHandler = function() { $(document).on('change', '[name="AddToWishlistForm_TargetWishlistID"], [name="MoveWishlistItemForm_TargetWishlistID"]', function() { var newWishlistNameInput = $('#NewWishlistName'); var bootstrapValidator = $(this.form).data('bootstrapValidator'); if($(this).attr('id') == 'NewWishlistRadioButton') { newWishlistNameInput.prop('disabled', false); bootstrapValidator.enableFieldValidators(newWishlistNameInput.attr('name'), true); } else { bootstrapValidator.enableFieldValidators(newWishlistNameInput.attr('name'), false); newWishlistNameInput.attr("disabled",""); } }); } /** * Updates the counter of the preferred wish list in the page header after adding a product to the wish list */ Wishlist.updateWishlistStatus = function(count) { $("#preferred-wishlist-counter").html(count); } $(document).ready(function(){ Wishlist.init(); });
process.env.FAKE_CHANNEL_PROVIDER = 'true'; process.env.SINGLE_ASSET_PAYMENT_CONTRACT_ADDRESS = '0x4308s69383d611bBB1ce7Ca207024E7901bC26b40'; // some dummy value to prevent 'not defined' errors module.exports = async () => { const {Server} = require('bittorrent-tracker'); global.tracker = new Server({http: true, ws: false, udp: false}); const waitForListening = new Promise(resolve => global.tracker.on('listening', resolve)); global.tracker.listen(4242); await waitForListening; };
class SelectorModule { /** * Render border around target element * @param {HTMLElement} target HTML element target for selector */ activateSelector(target) { let board = document.querySelector('.board') let tag = document.querySelector('.tagname') tag.textContent = target.tagName tag.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' tag.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top - tag.getBoundingClientRect().height + 'px' let bottomBord = document.querySelector('.bottom-border') let topBord = document.querySelector('.top-border') let rightBord = document.querySelector('.right-border') let leftBord = document.querySelector('.left-border') let leftOver = false let rightOver = false let bottomOver = false let topOver = false if ( target.getBoundingClientRect().left + board.getBoundingClientRect().left < board.getBoundingClientRect().left ) { leftOver = true } if ( target.getBoundingClientRect().right + board.getBoundingClientRect().left > board.getBoundingClientRect().right ) { rightOver = true } if ( target.getBoundingClientRect().top + board.getBoundingClientRect().top < board.getBoundingClientRect().top ) { topOver = true } if ( target.getBoundingClientRect().bottom + board.getBoundingClientRect().top > board.getBoundingClientRect().bottom ) { bottomOver = true } if (leftOver && topOver && !rightOver && !bottomOver) { // left, top 벗어날 때 tag.style.display = 'none' leftBord.style.display = 'none' topBord.style.display = 'none' rightBord.style.display = 'block' bottomBord.style.display = 'block' rightBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + target.getBoundingClientRect().width - 2 + 'px' rightBord.style.top = board.getBoundingClientRect().top + 'px' rightBord.style.height = target.getBoundingClientRect().height + target.getBoundingClientRect().top + 'px' bottomBord.style.left = board.getBoundingClientRect().left + 'px' bottomBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + target.getBoundingClientRect().height - 2 + 'px' bottomBord.style.width = target.getBoundingClientRect().width + target.getBoundingClientRect().left + 'px' // 1 } else if (!leftOver && topOver && !rightOver && !bottomOver) { // top 벗어날 때 tag.style.display = 'none' leftBord.style.display = 'block' topBord.style.display = 'none' rightBord.style.display = 'block' bottomBord.style.display = 'block' rightBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + target.getBoundingClientRect().width - 2 + 'px' rightBord.style.top = board.getBoundingClientRect().top + 'px' rightBord.style.height = target.getBoundingClientRect().height + target.getBoundingClientRect().top + 'px' leftBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' leftBord.style.top = board.getBoundingClientRect().top + 'px' leftBord.style.height = target.getBoundingClientRect().height + target.getBoundingClientRect().top + 'px' bottomBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' bottomBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + target.getBoundingClientRect().height - 2 + 'px' bottomBord.style.width = target.getBoundingClientRect().width + 'px' // 2 } else if (!leftOver && topOver && rightOver && !bottomOver) { // right, top 벗어날 때 tag.style.display = 'none' rightBord.style.display = 'none' topBord.style.display = 'none' leftBord.style.display = 'block' bottomBord.style.display = 'block' leftBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' leftBord.style.top = board.getBoundingClientRect().top + 'px' leftBord.style.height = target.getBoundingClientRect().height + target.getBoundingClientRect().top + 'px' bottomBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' bottomBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + target.getBoundingClientRect().height + 'px' bottomBord.style.width = target.getBoundingClientRect().width - (target.getBoundingClientRect().right - board.getBoundingClientRect().right) - board.getBoundingClientRect().left + 'px' // 3 } else if (!leftOver && !topOver && rightOver && !bottomOver) { // right 벗어날 때 tag.style.display = 'block' leftBord.style.display = 'block' rightBord.style.display = 'none' topBord.style.display = 'block' bottomBord.style.display = 'block' leftBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' leftBord.style.top = board.getBoundingClientRect().top + target.getBoundingClientRect().top + 'px' leftBord.style.height = target.getBoundingClientRect().height + 'px' bottomBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' bottomBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + target.getBoundingClientRect().height - 2 + 'px' bottomBord.style.width = target.getBoundingClientRect().width - (target.getBoundingClientRect().right - board.getBoundingClientRect().right) - board.getBoundingClientRect().left + 'px' topBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' topBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 'px' topBord.style.width = target.getBoundingClientRect().width - (target.getBoundingClientRect().right - board.getBoundingClientRect().right) - board.getBoundingClientRect().left + 'px' // 4 } else if (!leftOver && !topOver && rightOver && bottomOver) { // right, bottom 벗어날 때 tag.style.display = 'block' leftBord.style.display = 'block' rightBord.style.display = 'none' topBord.style.display = 'block' bottomBord.style.display = 'none' leftBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' leftBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 2 + 'px' leftBord.style.height = target.getBoundingClientRect().height - (target.getBoundingClientRect().bottom - board.getBoundingClientRect().bottom) - board.getBoundingClientRect().top + 'px' topBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' topBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 'px' topBord.style.width = target.getBoundingClientRect().width - (target.getBoundingClientRect().right - board.getBoundingClientRect().right) - board.getBoundingClientRect().left + 'px' // 5 } else if (!leftOver && !topOver && !rightOver && bottomOver) { // bottom 벗어날 때 tag.style.display = 'block' leftBord.style.display = 'block' rightBord.style.display = 'block' topBord.style.display = 'block' bottomBord.style.display = 'none' leftBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' leftBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 2 + 'px' leftBord.style.height = target.getBoundingClientRect().height - (target.getBoundingClientRect().bottom - board.getBoundingClientRect().bottom) - board.getBoundingClientRect().top + 'px' rightBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + target.getBoundingClientRect().width + 'px' rightBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 2 + 'px' rightBord.style.height = target.getBoundingClientRect().height - (target.getBoundingClientRect().bottom - board.getBoundingClientRect().bottom) - board.getBoundingClientRect().top + 'px' topBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' topBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 'px' topBord.style.width = target.getBoundingClientRect().width + 2 + 'px' // 6 } else if (leftOver && !topOver && !rightOver && bottomOver) { // left, bottom 벗어날 때 tag.style.display = 'none' leftBord.style.display = 'none' rightBord.style.display = 'block' topBord.style.display = 'block' bottomBord.style.display = 'none' rightBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + target.getBoundingClientRect().width + 'px' rightBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 2 + 'px' rightBord.style.height = target.getBoundingClientRect().height - (target.getBoundingClientRect().bottom - board.getBoundingClientRect().bottom) - board.getBoundingClientRect().top + 'px' topBord.style.left = board.getBoundingClientRect().left + 'px' topBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 'px' topBord.style.width = target.getBoundingClientRect().width - (board.getBoundingClientRect().left - target.getBoundingClientRect().left) + board.getBoundingClientRect().left + 2 + 'px' // 7 } else if (leftOver && !topOver && !rightOver && !bottomOver) { // left, bottom 벗어날 때 tag.style.display = 'none' leftBord.style.display = 'none' rightBord.style.display = 'block' topBord.style.display = 'block' bottomBord.style.display = 'block' rightBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + target.getBoundingClientRect().width + 'px' rightBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 2 + 'px' rightBord.style.height = target.getBoundingClientRect().height + 'px' topBord.style.left = board.getBoundingClientRect().left + 2 + 'px' topBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 'px' topBord.style.width = target.getBoundingClientRect().width - (board.getBoundingClientRect().left - target.getBoundingClientRect().left) + board.getBoundingClientRect().left + 'px' bottomBord.style.left = board.getBoundingClientRect().left + 'px' bottomBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + target.getBoundingClientRect().height + 'px' bottomBord.style.width = target.getBoundingClientRect().width - (board.getBoundingClientRect().left - target.getBoundingClientRect().left) + board.getBoundingClientRect().left + 'px' // 8 } else if (leftOver && !topOver && rightOver && !bottomOver) { // left, right 벗어날 때 tag.style.display = 'none' leftBord.style.display = 'none' rightBord.style.display = 'none' topBord.style.display = 'block' bottomBord.style.display = 'block' topBord.style.left = board.getBoundingClientRect().left + 2 + 'px' topBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 'px' topBord.style.width = target.getBoundingClientRect().width - (board.getBoundingClientRect().left - target.getBoundingClientRect().left) - (target.getBoundingClientRect().right - board.getBoundingClientRect().right) - 4 + 'px' bottomBord.style.left = board.getBoundingClientRect().left + 2 + 'px' bottomBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top - 2 + target.getBoundingClientRect().height + 'px' bottomBord.style.width = target.getBoundingClientRect().width - (board.getBoundingClientRect().left - target.getBoundingClientRect().left) - (target.getBoundingClientRect().right - board.getBoundingClientRect().right) - 4 + 'px' // 9 } else if (!leftOver && topOver && !rightOver && bottomOver) { // top, bottom 벗어날 때 tag.style.display = 'none' leftBord.style.display = 'block' rightBord.style.display = 'block' topBord.style.display = 'none' bottomBord.style.display = 'none' rightBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + target.getBoundingClientRect().width + 'px' rightBord.style.top = board.getBoundingClientRect().top + 2 + 'px' rightBord.style.height = target.getBoundingClientRect().height - (board.getBoundingClientRect().top - target.getBoundingClientRect().top) - (target.getBoundingClientRect().bottom - board.getBoundingClientRect().bottom) - 4 + 'px' leftBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' leftBord.style.top = board.getBoundingClientRect().top + 2 + 'px' leftBord.style.height = target.getBoundingClientRect().height - (board.getBoundingClientRect().top - target.getBoundingClientRect().top) - (target.getBoundingClientRect().bottom - board.getBoundingClientRect().bottom) - 4 + 'px' // 10 } else if (leftOver && topOver && !rightOver && bottomOver) { // left, top, bottom 벗어날 때 tag.style.display = 'none' leftBord.style.display = 'none' rightBord.style.display = 'block' topBord.style.display = 'none' bottomBord.style.display = 'none' rightBord.style.left = target.getBoundingClientRect().left + target.getBoundingClientRect().width + board.getBoundingClientRect().left + 'px' rightBord.style.top = board.getBoundingClientRect().top + 2 + 'px' rightBord.style.height = target.getBoundingClientRect().height - (board.getBoundingClientRect().top - target.getBoundingClientRect().top) - (target.getBoundingClientRect().bottom - board.getBoundingClientRect().bottom) - 4 + 'px' // 11 } else if (leftOver && topOver && rightOver && !bottomOver) { // left, top, right 벗어날 때 tag.style.display = 'none' leftBord.style.display = 'none' rightBord.style.display = 'none' topBord.style.display = 'none' bottomBord.style.display = 'block' bottomBord.style.left = board.getBoundingClientRect().left + 'px' bottomBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + target.getBoundingClientRect().height + 'px' bottomBord.style.width = target.getBoundingClientRect().width - (board.getBoundingClientRect().left - target.getBoundingClientRect().left) - (target.getBoundingClientRect().right - board.getBoundingClientRect().right) - 4 + 'px' // 12 } else if (!leftOver && topOver && rightOver && bottomOver) { // right, top, bottom 벗어날 때 tag.style.display = 'none' leftBord.style.display = 'block' rightBord.style.display = 'none' topBord.style.display = 'none' bottomBord.style.display = 'none' leftBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' leftBord.style.top = board.getBoundingClientRect().top + 2 + 'px' leftBord.style.height = target.getBoundingClientRect().height - (board.getBoundingClientRect().top - target.getBoundingClientRect().top) - (target.getBoundingClientRect().bottom - board.getBoundingClientRect().bottom) - 4 + 'px' // 13 } else if (leftOver && !topOver && rightOver && bottomOver) { // right, top, bottom 벗어날 때 tag.style.display = 'none' leftBord.style.display = 'none' rightBord.style.display = 'none' topBord.style.display = 'block' bottomBord.style.display = 'none' topBord.style.left = board.getBoundingClientRect().left + 2 + 'px' topBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 'px' topBord.style.width = target.getBoundingClientRect().width - (board.getBoundingClientRect().left - target.getBoundingClientRect().left) - (target.getBoundingClientRect().right - board.getBoundingClientRect().right) - 4 + 'px' // 14 } else if (leftOver && topOver && rightOver && bottomOver) { // 사방 벗어날 때 tag.style.display = 'none' leftBord.style.display = 'none' rightBord.style.display = 'none' topBord.style.display = 'none' bottomBord.style.display = 'none' // 15 } else { tag.style.display = 'block' leftBord.style.display = 'block' topBord.style.display = 'block' rightBord.style.display = 'block' bottomBord.style.display = 'block' topBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' topBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 'px' topBord.style.width = target.getBoundingClientRect().width + 'px' // bottomBord.style.display = 'none'? leftBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' leftBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 'px' leftBord.style.height = target.getBoundingClientRect().height + 'px' rightBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + target.getBoundingClientRect().width + 'px' rightBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + 'px' rightBord.style.height = target.getBoundingClientRect().height + 2 + 'px' bottomBord.style.left = target.getBoundingClientRect().left + board.getBoundingClientRect().left + 'px' bottomBord.style.top = target.getBoundingClientRect().top + board.getBoundingClientRect().top + target.getBoundingClientRect().height + 'px' bottomBord.style.width = target.getBoundingClientRect().width + 'px' } } } export default new SelectorModule()
import React, { Component } from 'react'; import logo from '../../logo.svg'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faSearch, } from '@fortawesome/free-solid-svg-icons'; class Navigation extends Component { state = {} render() { return ( <nav className="w-auto flex flex-row justify-between items-center p-10"> <div className="flex-initial flex flex-row justify-center items-center"> <div className="mr-10"> <img className="h-10 w-10" alt="Brand" src={logo} /> <span></span> </div> <div className="flex flex-row bg-white px-8 py-3 rounded-lg"> <button className="text-gray-300 mr-5"> <FontAwesomeIcon icon={faSearch} /> </button> <input type="text" placeholder="Search for what you need" className="w-screen max-w-sm" /> </div> <ul className="flex flex-row"> <li className="text-sm font-extrabold text-blue-500 ml-10 mr-5"> <a href="/"> Inbox </a> </li> <li className="text-sm font-extrabold text-blue-500 mr-10 ml-5"> <a href="/"> Contact </a> </li> </ul> </div> <div className="flex flex-row items-baseline"> <img className="h-10 w-10 rounded-full content-cover" alt="Profile" src="https://images.pexels.com/photos/2755075/pexels-photo-2755075.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260" /> <div className="bg-blue-600 h-3 w-3 rounded-full -ml-2"></div> </div> </nav> ); } } export default Navigation;
var handlers = { listQueue: require('./page.msgcenter.plaintext.listqueue.js'), process: require('./page.msgcenter.plaintext.process.js'), }; module.exports = function(queues, parameter, action, post, respond){ if($.types.isString(action)){ handlers.process(queues, parameter, post, respond, action); } else { handlers.listQueue(queues, parameter, post, respond); }; };
import test from "tape" import { is, isNothing, isTrue, not, isFalse, isObject } from "./is" /** * Test if something is not `null` or `undefined` * * @tag Core * @signature is(source): boolean * * @param {any} source Source variable * * @return {boolean} * * @example * * is(null) // => false * is(0) // => true * is(undefined) // => false * is("") // => true * is(false) // => true * is(NaN) // => false */ test("is", t => { t.equal(is(false), true, 'Is "false" something') t.equal(is(0), true, `Is "0" something`) t.equal(is(""), true, "Is empty-string something") t.equal(is(null), false, 'Is "null" something') t.equal(is(undefined), false, 'Is "undefined" something') t.equal(is(NaN), false, 'Is "NaN" something') t.equal(not(is)(NaN), true, '"NaN" is not something') t.equal(isTrue(""), false, "empty string is not true") t.equal(isTrue(true), true, "boolean value true is true") t.equal(isFalse(""), false, "empty string is not false") t.equal(isFalse(false), true, "boolean value false is false") t.equal(isNothing(false), false, '"false" is something') t.equal(isNothing(0), false, `"0" is something`) t.equal(isNothing(""), false, "Empty-string is something") t.equal(isNothing(null), true, '"null" is nothing') t.equal(isNothing(undefined), true, '"undefined" is nothing') t.equal(isNothing(NaN), true, '"NaN" is nothing') t.equal(isObject(null), false, "null is not object") t.equal(isObject({}), true, "{} is object") t.equal(isObject([]), false, "[] is not object") t.equal(isObject("lorem"), false, "string is not object") t.end() })
app.controller('alphaController', function($scope){ $scope.toDoList = [ { itemName: 'Write all the loops' }, { itemName: 'Get all of the dry cleaning' }, { itemName: 'Go to all the grocery stores' }, { itemName: 'Eat all the pizza' }, { itemName: 'Read all the JavaScript Books' }, { itemName: 'Drink all the beer' }, { itemName: 'Buy son all the lightsabers' }, { itemName: 'Make all the SPA\'s' }, { itemName: 'Be all the awesome' } ]; $scope.addItem = function(item) { for (var i = 0; i < $scope.toDoList.length; i++){ if (item.name.toLowerCase() === $scope.toDoList[i].itemName.toLowerCase()){ $scope.toDoList.splice(i, 1); return; }; }; $scope.toDoList.push({itemName: item.name}); }; });
import React from 'react'; import { Text, View } from 'react-native'; import Icon from 'react-native-vector-icons/FontAwesome'; const ProfileStats = (props) => { return ( <View style={styles.containerStyle}> <Text style={styles.labelStyle}>{props.label.toUpperCase()}</Text> <Text style={styles.iconStyles}><Icon name={props.icon} size={16} color={'#4296cc'} /> {props.data}</Text> </View> ); }; const styles = { containerStyle: { flex: 1, alignItems: 'stretch', borderColor: 'lightgray', borderWidth: 1, borderRadius: 1, height: 50, padding: 5, margin: 5 }, iconStyles: { color: '#4296cc', fontWeight: 'bold', fontSize: 16 }, labelStyle: { fontSize: 10, color: 'gray', fontWeight: 'bold', marginBottom: 2 } }; export default ProfileStats;
var express = require('express'); var router = express.Router(); var multer = require('multer'); var upload = multer({ dest: './dist/images' }); var async = require('async'); var nodemailer = require('nodemailer'); var crypto = require('crypto'); var bcrypt = require('bcryptjs'); var Post = require('../models/post'); var User = require('../models/user'); // Get Homepage router.get('/', ensureAuthenticated, function(req, res){ User.findOne({member_id:req.user.member_id}, function(err, user){ Post.aggregate([{$lookup:{from:"users",localField:"author", foreignField:"member_id", as:"user_details"}},{$match:{trashed:"N"}},{$sort:{date:-1}}]).exec(function(err, posts){ // Post.find({trashed:"N"},function(err, posts){ //console.log(req.user.user_profile[0].profilepic); //console.log(user); //if(err) throw err; //console.log(user.admin); res.render('index', {posts:posts, user: user.member_id, users: user, isApproved: user.isApproved, isAdmin: user.admin}); }); }); }); // Add Posts router.post('/add', ensureAuthenticated, upload.single('postimage'), function(req, res){ var description = req.body.description; var author = req.user.member_id; var date = new Date(); if(req.file){ var postimage = req.file.filename; } var newPost = new Post({ description: description, date: date, postimage: postimage, author: author }); Post.createPost(newPost, function(err, post){ if(err) throw err; req.flash('success', 'Your post is published'); res.redirect('/'); }); }); // Forgot-Password template router.get('/forgot-password', function(req, res){ //User.findOne({member_id:req.user.member_id}, function(err, user){ //res.render('forgot-password/forgot-password',{isApproved: user.isApproved}); res.render('forgot-password/forgot-password'); //}); }); // Post forgot Password router.post('/forgot-password', function(req, res, next) { async.waterfall([ function(done) { crypto.randomBytes(20, function(err, buf) { var token = buf.toString('hex'); done(err, token); }); }, function(token, done) { User.findOne({ email: req.body.email }, function(err, user) { if (!user) { req.flash('error', 'No account with that email address exists.'); return res.redirect('/forgot-password'); } user.resetPasswordToken = token; user.resetPasswordExpires = Date.now() + 3600000; // 1 hour console.log(user); user.save(function(err) { done(err, token, user); }); }); }, function(token, user, done) { var smtpTransport = nodemailer.createTransport({ host: "smtp.gmail.com", auth: { user: 'connect19test@gmail.com', pass: 'connect19@123' }, tls: { rejectUnauthorized: false } }); var mailOptions = { to: user.email, from: 'connect19test@gmail.com', subject: 'Node.js Password Reset', text: 'You are receiving this because you (or someone else) have requested the reset of the password for your account.\n\n' + 'Please click on the following link, or paste this into your browser to complete the process:\n\n' + 'http://' + req.headers.host + '/reset-password/' + token + '\n\n' + 'If you did not request this, please ignore this email and your password will remain unchanged.\n' }; smtpTransport.sendMail(mailOptions, function(err) { console.log('mail sent'); req.flash('success', 'An e-mail has been sent to ' + user.email + ' with further instructions.'); done(err, 'done'); }); } ], function(err) { if (err) return next(err); res.redirect('/forgot-password'); }); }); // Get Password Reset Token router.get('/reset-password/:token', function(req, res) { User.findOne({ resetPasswordToken: req.params.token, resetPasswordExpires: { $gt: Date.now() } }, function(err, user) { if (!user) { req.flash('error', 'Password reset token is invalid or has expired.'); return res.redirect('/forgot-password'); } res.render('forgot-password/reset-password', {token: req.params.token}); }); }); // Post Password Reset Token router.post('/reset-password/:token', function(req, res) { async.waterfall([ function(done) { User.findOne({ resetPasswordToken: req.params.token, resetPasswordExpires: { $gt: Date.now() } }, function(err, user) { console.log(user); if (!user) { req.flash('error', 'Password reset token is invalid or has expired.'); return res.redirect('back'); } if(req.body.password === req.body.confirm) { //user.setPassword(req.body.password, function(err) { user.resetPasswordToken = undefined; user.resetPasswordExpires = undefined; var password = req.body.password; bcrypt.genSalt(10, function(err, salt) { console.log(salt); bcrypt.hash(password, salt, function(err, hash) { // console.log(hash); user.password = hash // Store hash in your password DB. // user.update({$set:{password:hash}}, function (err, user) { // console.log(user); // req.flash('success_msg', 'Your password has been changed'); // req.logIn(user, function(err) { // done(err, user); // }); //console.log(user); //console.log('3'); // }); user.save({password:hash}, function(err ,user) { // console.log(user); req.logIn(user, function(err) { done(err, user); }); }); }); }); // user.save(function(err) { // req.logIn(user, function(err) { // done(err, user); // }); // }); // }) } else { req.flash("error", "Passwords do not match."); return res.redirect('back'); } }); }, function(user, done) { var smtpTransport = nodemailer.createTransport({ host: "smtp.gmail.com", auth: { user: 'connect19test@gmail.com', pass: 'connect19@123' }, tls: { rejectUnauthorized: false } }); var mailOptions = { to: user.email, from: 'connect19test@gmail.com', subject: 'Your password has been changed', text: 'Hello,\n\n' + 'This is a confirmation that the password for your account ' + user.email + ' has just been changed.\n' }; smtpTransport.sendMail(mailOptions, function(err) { req.flash('success', 'Success! Your password has been changed.'); done(err); }); } ], function(err) { res.redirect('/'); }); }); // Post flags router.post('/', function(req, res){ Post.findOne({'post_id': req.body.flag_post_id}, function(err, post){ //console.log(post); post.update({$push: {"flag": {"post_id": post.post_id, "description": post.description, "postimage": post.postimage, "author": post.author, "date": post.date}}}, function(err){ res.send(); }) }); }); // Get flags router.get('/flags', ensureAuthenticated, function(req, res){ User.find({username: req.user.username}, function(err, user){ //console.log(user[0].admin); Post.find({},{flag:1},function(err, posts){ //console.log(req.user.user_profile[0].profilepic); //console.log(posts); if(err) throw err; res.render('flags/index', {posts:posts, user: user[0].admin, users: user, isApproved: user[0].isApproved}); }); }); }); // Post Trash router.post('/flags', function(req, res){ Post.findOne({'post_id': req.body.trash_post_id}, function(err, post){ console.log(post); post.update({$set:{trashed: 'Y'},$push: {"trash": {"post_id": post.post_id, "description": post.description, "postimage": post.postimage, "author": post.author, "date": post.date}}, $pull: {"flag": {post_id: req.body.trash_post_id}}}, function(err){ res.send(); }) }); }); // Get Trash router.get('/trash', ensureAuthenticated, function(req, res){ User.find({username: req.user.username}, function(err, user){ Post.find({},function(err, posts){ //console.log(req.user.user_profile[0].profilepic); if(err) throw err; res.render('trash/index', {posts:posts, user: user[0].admin, users: user, isApproved: user[0].isApproved}); }); }); }); // Post Undo-Trash router.post('/trash', function(req, res){ Post.findOne({'post_id': req.body.trash_post_id}, function(err, post){ //console.log(post); post.update({$set:{trashed: 'N'},$pull: {"trash": {post_id: req.body.trash_post_id}}}, function(err){ res.send(); }) }); }); // Delete-Trash Post router.post('/trash/delete', function(req, res){ console.log(req.body.trashed_post_id); Post.remove({'post_id': req.body.trashed_post_id}, function(err, post){ res.send(); }); }); // Router for Conference router.get('/conference-schedule', ensureAuthenticated, function(req, res){ res.render('conference/index.hbs',{title: "Conferece Schedule"}) }) function ensureAuthenticated(req, res, next){ if(req.isAuthenticated()){ return next(); } else { //req.flash('error_msg','You are not logged in'); res.redirect('/users/login'); } } module.exports = router;
//React import React, { useState } from 'react'; import { useMutation } from '@apollo/client'; import { EDIT_POST } from '../utils/mutations'; //Chakra Components import { Modal, ModalOverlay, ModalContent, ModalHeader, ModalBody, ModalCloseButton, } from '@chakra-ui/react'; import { FormControl, Input, Flex, Spacer, Button } from '@chakra-ui/react'; //Chakra Hooks import { useDisclosure } from '@chakra-ui/react'; //Chakra Icons import { EditIcon } from '@chakra-ui/icons'; import DeleteBtn from './DeleteBtn'; const EditPostModal = ({ post_id, bg, message, deletePostHandler }) => { const [postText, setPostText] = useState(message); const [modalHeader, setModalHeader] = useState(''); const { isOpen, onOpen, onClose } = useDisclosure(); const [editPost, { error }] = useMutation(EDIT_POST, { update(cache, { data: { editPost } }) { try { // const { posts } = cache.readQuery({ query: QUERY_POSTS }); cache.modify({ id: cache.identify(post_id), fields: { postText(cachedText) { return (cachedText = editPost.postText); }, }, }); } catch (err) { console.error(err); console.error(error); } }, }); const handleInputChange = e => { const { name, value } = e.target; if (name === 'message') { setPostText(value); } }; const editPostHandle = (e, text) => { e.preventDefault(); setPostText(text); //Set Modal Header as Add Post setModalHeader('Edit Post'); //Open Modal onOpen(); }; const handleSubmit = async (e, id) => { e.preventDefault(); if (modalHeader === 'Edit Post') { try { const newEdit = { _id: id, postText: postText }; await editPost({ variables: { ...newEdit }, }); } catch (err) { console.log(err); console.log(error); } setPostText(''); } else { try { } catch (err) { console.log(err); console.log(error); } } onClose(); }; return ( <> <Button className="post-editBtn" size="sm" bg={bg} variant="solid" onClick={e => { editPostHandle(e, message); }} > {' '} <EditIcon /> </Button> <Modal isOpen={isOpen} onClose={onClose}> <ModalOverlay /> <ModalContent> <ModalHeader>{modalHeader}</ModalHeader> <ModalCloseButton /> <ModalBody> <FormControl id="message"> <Input type="text" name="message" placeholder="What are you thinking about?" variant="filled" mb={3} value={postText} onChange={handleInputChange} /> </FormControl> </ModalBody> <Flex p={3}> <DeleteBtn onClose={onClose} post_id={post_id}/> <Spacer /> <Button colorScheme="pink" variant="outline" mr={3} onClick={onClose} > Cancel </Button> <Button colorScheme="cyan" variant="outline" onClick={e => { handleSubmit(e, post_id); }} > Submit </Button> </Flex> </ModalContent> </Modal> </> ); }; export default EditPostModal;
// var URL = 'http://localhost:3000'; var URL = 'https://fleurish.herokuapp.com'; // signUp $('#createAccount').click(function(){ var createAccount = { "firstName": $('#firstName').val(), "lastName": $('#lastName').val(), "signInEmail": $('#signInEmail').val(), "password": $('#createPassword').val(), "confirmPassword": $('#retypePassword').val() } $.post(URL+'/create-Account', createAccount, function(err,response){ createAccount; }) $('#createAccount').trigger("reset"); }); // login $('#loginButton').click(function(){ var loginForm = { "loginEmail": $('#loginEmail').val(), "loginPassword": $('#loginPassword').val(), } $.post(URL+'/login-Account', loginForm, function(err,response){ loginForm; }); $('#loginForm').trigger("reset"); $(document).ready(function(){ $("#lostPasswordBtn").on('click', function(){ $(".popup1").fadeIn('slow'); }); }); });
export const FETCH_TRANSACTIONS = 'FETCH_TRANSACTIONS'; import * as APIUtil from '../util/transactions_api'; export const fetchTransactions = transactions => ({ type: FETCH_TRANSACTIONS, payload: transactions[0] }); export const createTransaction = transaction => { const user_id = (window.store) ? window.store.getState().session.id : 0; return ( Promise.all([APIUtil.createTransaction(user_id, transaction)]) .then(res => dispatch(fetchAPITransactions())) // reload the state ); }; export const fetchAPITransactions = () => dispatch => { // if store is available get user otherwise return default id const user_id = (window.store) ? window.store.getState().session.id : 0; return( Promise.all([APIUtil.fetchTransactions(user_id)]) .then(res => dispatch(fetchTransactions(res))) ); };
var gamemenu = function( p ) { this.e = {}; this.menuc = 0; this.menuactive = 1; this.cur = 0; document.gamemenu = { 'menu':this } this.e["menu"] = new create_div( {'p':p, "c":"no-select"} ); this.e["menu"].transition( {"margin-top":0.3} ); this.e["menu"].style( { "width":"100%", "height":"200px", "BColor":rgb(0,0,0), "position":"relative", "MTop":"-175px", "pointerEvents":"all" } ); this.maxitemc = (25*10)+5; this.maxitemscale = function( a ) { this.maxitemc = a; this.e[0][3].style( { "maxHeight":this.maxitemc+"px" } ); this.e[0][0].style( { "maxHeight":this.maxitemc+"px" } ); this.e[0][0].div.rescale( this.e[0][1].div ); } // QUERY MENU this.e[0] = {}; this.e[0][5] = new create_div( {'p':this.e["menu"]} ); this.e[0][5].transition( {"height":0.3} ); this.e[0][5].style( { "float":"right", "width":"auto", "height":"auto", "minHeight":"175px", "indexZ":"100" } ); this.e[0][3] = new create_div( {'p':this.e[0][5]} ); this.e[0][3].transition( {"height":0.3} ); this.e[0][3].style( { "width":"200px", "height":"170px", "BColor":rgb(50,50,50), "minHeight":"173px", "maxHeight":this.maxitemc+"px", "overflow":"hidden", "borderLeft":"2px solid "+rgb(100,100,100), "borderBottom":"2px solid "+rgb(50,50,50), } ); this.e[0][0] = new create_div( {'p':this.e[0][3]} ); this.e[0][0].transition( {"height":0.3, "color":0.5, "width":0.5} ); this.e[0][0].style( { "float":"left", "width":"100%", "height":"100%", "BColor":rgb(75,75,75), "overflow":"hidden", "minHeight":"calc(100% - 25px)", "maxHeight":this.maxitemc+"px" } ); this.e[0][0].div.menu = this; this.e[0][0].div.rescale = function( h, sc ) { var hsize = this.menu.size( h ), him = this.menu; him.e[0][0].style( { "color":( (hsize==0)? rgb(200,200,200) : him.e[0][1].div.style.backgroundColor ) } ); him.e[0][1].style( { "height":hsize+"px" } ); him.e[0][0].style( { "width":"calc(100% - "+( (hsize > him.maxitemc)? 10 : 0 )+"px)" } ); him.e[0][3].style( { "height":Math.min(hsize, parseInt(him.e[0][3].div.style.maxHeight))+"px" } ); him.e[0][2].scroll = ( (hsize > him.maxitemc)? him.e[0][2].scroll : 0 ); him.e[0][2].style( { "width":( (hsize > him.maxitemc)? 10 : 0 )+"px" } ); him.e[0][4].style( { "height":( (hsize > 200)? 20 : 0 )+"px" } ); if (sc != true) { var he = 100*(him.e[0][0].div.offsetHeight/hsize); him.e[0][2].style( { "height":Math.min(100, he)+"%" } ); him.e[0][2].resize(); } } this.e[0][1] = new create_div( {'p':this.e[0][0]} ); this.e[0][1].transition( {"height":0.3} ); this.e[0][1].style( { "float":"left", "width":"100%", "height":"175px", "BColor":rgb(75,75,75), "position":"relative", "textAlign":"center", "lineHeight":"175px", "fontSize":"20px", "*innerHTML":"Empty" } ); this.e[0][2] = new create_div( {'p':this.e[0][3]} ); this.e[0][2].transition( {"width":0.5} ); this.e[0][2].div.menu = this; this.e[0][2].scroll = 0; this.e[0][2].drag = false; this.e[0][2].style( { "width":"0px", "height":"100%", "float":"right", "BColor":rgb(25,25,25), "MTop":"0px" } ); this.e[0][2].resize = function() { var a = this.div.menu var c = ( ((a.size( a.e[0][1].div )-a.e[0][0].div.offsetHeight)*-1)*a.e[0][2].scroll ); var d = Math.max( 0, a.e[0][3].div.offsetHeight-a.e[0][2].div.offsetHeight)*a.e[0][2].scroll; a.e[0][2].div.style.marginTop = d+"px"; a.e[0][1].div.style.marginTop = Math.min( 0, c )+"px"; } this.e[0][2].div.onmousedown = function( e ) { var a = this.menu.e; a[0][2].drag = true; a[0][2].topOffset = e.pageY-parseInt(this.style.marginTop); } document.addEventListener("mousemove", function( e ) { var a = this.gamemenu.menu.e, him = this.gamemenu.menu; if (a[0][2].drag) { var b = Math.max( 0, Math.min( a[0][3].div.offsetHeight-a[0][2].div.offsetHeight, e.pageY - a[0][2].topOffset ) ); var c = b/(a[0][3].div.offsetHeight-a[0][2].div.offsetHeight); a[0][2].scroll = c; a[0][2].div.style.marginTop = b+"px"; a[0][1].div.style.marginTop = ( ((him.size( a[0][1].div )-a[0][0].div.offsetHeight)*-1)*c )+"px"; a[0][0].div.rescale( a[0][1].div ); } }, false ); document.addEventListener("mouseup", function( e ) { var a = this.gamemenu.menu.e; a[0][2].drag = false; }, false ); this.e[0][4] = new create_div( {'p':this.e[0][5]} ); this.e[0][4].transition( {"height":0.5, "background-color":0.3, "text-shadow":0.3} ); this.e[0][4].div.menu = this; this.e[0][4].scroll = 0; this.e[0][4].drag = false; this.e[0][4].style( { "width":"30px", "height":"0px", "BColor":rgb(50,50,50), "MTop":"0px", "MLeft":"10px", "borderBottomRightRadius":"5px", "borderBottomLeftRadius":"5px" } ); this.e[0][4].div.onmouseover = function() { if (!this.clicked) { this.style.backgroundColor = rgb(60,60,60) } } this.e[0][4].div.onmouseout = function() { if (!this.clicked) { this.style.backgroundColor = rgb(50,50,50) } } this.e[0][4].div.onmousedown = function( e ) { var a = this.menu.e, him = this.menu; a[0][4].drag = true; a[0][3].transition( {"height":0, "max-height":0} ); a[0][0].transition( {"height":0, "max-height":0, "color":0.3, "width":0.5} ); a[0][4].topOffset = Math.max( e.pageY-him.size( him.e[0][1].div ), e.pageY-parseInt(a[0][3].div.style.maxHeight) ); } document.addEventListener("mousemove", function( e ) { var a = this.gamemenu.menu.e, him = this.gamemenu.menu; if (a[0][4].drag) { var b = Math.min( him.size( him.e[0][1].div ), Math.max( 200, e.pageY - a[0][4].topOffset )); a[0][4].scale = b; a[0][3].div.style.maxHeight = b+"px"; a[0][0].div.style.maxHeight = b+"px"; him.maxitemc = b; a[0][0].div.rescale( a[0][1].div ); } }, false ); document.addEventListener("mouseup", function( e ) { var a = this.gamemenu.menu.e, him = this.gamemenu.menu; if (a[0][4].drag) { a[0][4].drag = false; a[0][3].transition( {"height":0.3, "max-height":0.3} ); a[0][0].transition( {"height":0.3, "max-height":0.3, "color":0.3, "width":0.5} ); setTimeout( function(){ if (!a[0][4].drag) { var b = ( (a[0][2].scroll == 1)? a[0][4].scale : (Math.round( a[0][4].scale/25 )*25)+5 ); a[0][3].div.style.maxHeight = b+"px"; a[0][0].div.style.maxHeight = b+"px"; him.maxitemc = b; setTimeout( function(){ if (!a[0][4].drag) { a[0][0].div.rescale( a[0][1].div ); } }, 50 ); } }, 50 ); } }, false ); // QUERY MENU ------------- end // MOB LIST this.e[1] = {}; this.e[1][0] = new create_div( {'p':this.e["menu"]} ); this.e[1][0].style( { "width":"calc(100% - 202px)", "height":"calc(100% - 25px)", "BColor":rgb(75,75,75), "overflow":"hidden" } ); this.e[1][6] = new create_div( {'p':this.e[1][0]} ); this.e[1][6].transition( {"width":0.5} ) this.e[1][6].style( { "float":"right", "width":"10px", "height":"100%", "BColor":rgb(50,50,50), "MRight":"2px" } ); this.e[1][2] = new create_div( {'p':this.e[1][6]} ); this.e[1][2].div.menu = this; this.e[1][2].style( { "width":"100%", "height":"100%", "BColor":rgb(25,25,25) } ); this.e[1][2].resize = function() { var a = this.div.menu, he = 100*(a.e[1][0].div.offsetHeight/a.e[1][3].div.offsetHeight); a.e[1][6].style( { "width":( (he >= 100)? 0 : 10)+"px" } ); this.style( { "height":he+"%", "MTop":"0px" } ); a.e[1][3].style( { "width":( (he >= 100)? "100%" : "calc(100% - 10px)") } ); var c = ( ((a.e[1][3].div.offsetHeight-a.e[1][0].div.offsetHeight)*-1)*a.e[1][3].scroll ); var d = Math.max( 0, a.e[1][0].div.offsetHeight-a.e[1][2].div.offsetHeight)*a.e[1][3].scroll; a.e[1][2].div.style.marginTop = d+"px"; a.e[1][3].div.style.marginTop = Math.min( 0, c )+"px"; a.e[1][3].scroll = ( (he >= 100)? 0 : a.e[1][3].scroll ); } this.e[1][3] = new create_div( {'p':this.e[1][0]} ); this.e[1][3].div.menu = this; this.e[1][3].scroll = 0; this.e[1][3].transition( {"width":0.5} ); this.e[1][3].style( { "width":"calc(100% - 12px)", "height":"auto", "BColor":rgb(75,75,75) } ); this.e[1][2].drag = false; this.e[1][2].div.menu = this; this.e[1][2].div.onmousedown = function( e ) { var a = this.menu.e; a[1][2].drag = true; a[1][2].topOffset = e.pageY-parseInt(this.style.marginTop); } document.addEventListener("mousemove", function( e ) { var a = this.gamemenu.menu.e; if (a[1][2].drag) { var b = Math.max( 0, Math.min( a[1][0].div.offsetHeight-a[1][2].div.offsetHeight, e.pageY - a[1][2].topOffset ) ); var c = b/(a[1][0].div.offsetHeight-a[1][2].div.offsetHeight); a[1][3].scroll = c; a[1][2].div.style.marginTop = b+"px"; a[1][3].div.style.marginTop = ( ((a[1][3].div.offsetHeight-a[1][0].div.offsetHeight)*-1)*c )+"px"; } }, false ); window.gamemenu.menu = this; window.addEventListener("resize", function( e ) { this.gamemenu.menu.e[1][2].resize(); }, false ); document.addEventListener("mouseup", function( e ) { var a = this.gamemenu.menu.e; a[1][2].drag = false; }, false ); this.e[1][1] = new create_div( {'p':this.e["menu"]} ); this.e[1][1].transition( {"background-Color":0.5, "background-position":0.5} ) this.e[1][1].style( { "width":"100%", "height":"25px", "borderBottom":"2px solid "+rgb(50,50,50), "borderTop":"2px solid "+rgb(100,100,100), "background":"url(./content/gui/open.png) 0px 0px no-repeat", "backgroundPosition":"50% 0px", "BColor":rgb(75,75,75) } ); this.e[1][1].div.onmouseover = function() { if (!this.clicked) { this.style.backgroundColor = rgb(90,90,90) } } this.e[1][1].div.onmouseout = function() { if (!this.clicked) { this.style.backgroundColor = rgb(75,75,75) } } // MOB LIST ------------------ end // LOADING /* this.e[1][4] = new create_div( {'p':this.e[1][3]} ); this.e[1][4].div.menu = this; this.e[1][4].style( { "width":"25px", "height":"25px", "BColor":rgb(0,100,200), "M":"5px", "display":"inline-block" } ); this.e[1][4].div.onclick = function() { this.menu.add(); } this.e[1][5] = new create_div( {'p':this.e[1][3]} ); this.e[1][5].div.menu = this; this.e[1][5].style( { "width":"25px", "height":"25px", "BColor":rgb(0,200,0), "M":"5px", "display":"inline-block" } ); this.e[1][5].div.onclick = function() { var div = new create_div( {'p':this.menu.e[1][3]} ); div.style( { "width":"25px", "height":"25px", "BColor":rgb(100,100,0), "M":"5px", "display":"inline-block"} ); this.menu.e[1][2].resize(); }*/ this.maxstats = { "speed":0.1, "maxhp":100, "range":15, "attackspeed":2.5, "attack_dmg":10, } var stat = { 0:"speed", 1:"maxhp", 2:"range", 3:"attackspeed", 4:"attack_dmg" } for (var i in mob) { for (var v in stat) { this.maxstats[stat[v]] = ( (this.maxstats[stat[v]] < mob[i].prototype[stat[v]])? mob[i].prototype[stat[v]] : this.maxstats[stat[v]] ) } } this.e[1]["mob"] = {}; for (var i in mob) { var mobwidth = 100, mobheight = 110; this.e[1]["mob"][i] = new create_div( {'p':this.e[1][3], 't':"canvas"} ); this.e[1]["mob"][i].menu = this; this.e[1]["mob"][i].mob = mob[i]; this.e[1]["mob"][i].self = this.e[1]["mob"][i]; this.e[1]["mob"][i].style( { "width":mobwidth+"px", "height":mobheight+"px", "*width":mobwidth, "*height":mobheight, "M":"5px", "display":"inline-block", "borderRadius":"5px" } ); this.e[1]["mob"][i].transition( {"box-shadow":0.3, "border-color":0.3, "margin":0.3} ); this.e[1]["mob"][i].div.onmouseover = function() { if (!this.clicked) { this.style.boxShadow = "0 0 3px "+rgb(200,200,200) } } this.e[1]["mob"][i].div.onmouseout = function() { if (!this.clicked) { this.style.boxShadow = "0 0 0px "+rgb(0,0,0) } } this.e[1]["mob"][i].div.menu = this; this.e[1]["mob"][i].div.self = this.e[1]["mob"][i]; this.e[1]["mob"][i].div.mobtype = i; this.e[1]["mob"][i].div.onclick = function() { this.menu.add( this.mobtype, 1 ); var self = this.self.div; self.style.marginLeft = "10px"; self.style.marginRight = "0px"; self.style.marginTop = "10px"; self.style.marginBottom = "0px"; setTimeout( function() { self.style.marginLeft = "5px"; self.style.marginRight = "5px"; self.style.marginTop = "5px"; self.style.marginBottom = "5px"; }, 300 ); } this.e[1]["mob"][i].draw = function() { var him = this.self, ctx = him.div.getContext('2d'); ctx.clearRect( 0, 0, him.div.width, him.div.height ); var rounded = 10; var stat = this.menu.maxstats; var metrics, tlast; var text = function( t, f, x, y ) { tlast = t; ctx.font = f+"px Georgia"; metrics = ctx.measureText( t ); ctx.fillStyle = "white"; ctx.strokeStyle = 'black'; ctx.lineWidth = 4; } var bar = function( color, name, s, m, y, h ) { var size = 1; var imgsize = 30; text( name, font ); ctx.strokeText( tlast, 5, y+(font/1.5) ); ctx.fillText( tlast, 5, y+(font/1.5) ); ctx.beginPath(); ctx.fillStyle = rgb(50,50,50); ctx.rect( (10+imgsize), y, him.div.width-((10*2) +imgsize), h ); ctx.closePath(); ctx.fill(); ctx.beginPath(); ctx.rect( (10+imgsize)-size, y-size, him.div.width-( (10-size)*2 +imgsize), h+(size*2) ); ctx.lineWidth = 1; ctx.strokeStyle = "white"; ctx.closePath(); ctx.stroke(); ctx.fillStyle = color; ctx.fillRect( imgsize+10, y, (him.div.width-(20+imgsize))*(s/m), h ); } var black = ctx.createLinearGradient(0,0,him.div.width,him.div.height); black.addColorStop( 0, rgb(0, 0, 0) ); if (this.mob.prototype.powertype == 1) { black.addColorStop( 0.4, rgb(20, 20, 50) ); black.addColorStop( 0.5, rgb(50, 50, 200) ); black.addColorStop( 0.6, rgb(20, 20, 50) ); } else if (this.mob.prototype.powertype == 2) { black.addColorStop( 0.4, rgb(50, 20, 20) ); black.addColorStop( 0.5, rgb(200, 50, 50) ); black.addColorStop( 0.6, rgb(50, 20, 20) ); } else if (this.mob.prototype.powertype == 3) { black.addColorStop( 0.4, rgb(0, 50, 30) ); black.addColorStop( 0.5, rgb(0, 200, 100) ); black.addColorStop( 0.6, rgb(0, 50, 30) ); } else { black.addColorStop( 0.4, rgb(50, 50, 50) ); black.addColorStop( 0.5, rgb(70, 70, 70) ); black.addColorStop( 0.6, rgb(50, 50, 50) ); } black.addColorStop( 1, rgb(0, 0, 0) ); ctx.beginPath(); ctx.arc( rounded, rounded, rounded, Math.PI*1, Math.PI*1.5 ); ctx.arc( him.div.width-rounded, rounded, rounded, Math.PI*1.5, Math.PI*2 ); ctx.arc( him.div.width-rounded, him.div.height-rounded, rounded, 0, Math.PI*0.5 ); ctx.arc( rounded, him.div.height-rounded, rounded, Math.PI*0.5, Math.PI*1 ); ctx.closePath(); ctx.fillStyle = black; ctx.fill(); var font = (him.div.width/9); if (this.mob.prototype.notmob) { text( this.mob.prototype.name, font ); ctx.strokeText( tlast, (him.div.width/2)-(metrics.width/2), font ); ctx.fillText( tlast, (him.div.width/2)-(metrics.width/2), font ); text( "-"+this.mob.prototype.cost+" / +0", font ); ctx.strokeText( tlast, (him.div.width/2)-(metrics.width/2), (font+2)*2 ); ctx.fillText( tlast, (him.div.width/2)-(metrics.width/2), (font+2)*2 ); } else { text( this.mob.prototype.name, font ); ctx.strokeText( tlast, (him.div.width/2)-(metrics.width/2), font ); ctx.fillText( tlast, (him.div.width/2)-(metrics.width/2), font ); text( "-"+this.mob.prototype.cost+" / +"+this.mob.prototype.income, font ); ctx.strokeText( tlast, (him.div.width/2)-(metrics.width/2), (font+2)*2 ); ctx.fillText( tlast, (him.div.width/2)-(metrics.width/2), (font+2)*2 ); bar( rgb(250,0,0), "dmg", this.mob.prototype["attack_dmg"], stat["attack_dmg"], (font+2)*3, 8 ); bar( rgb(0,200,0), "hp", this.mob.prototype["maxhp"], stat["maxhp"], (font+2)*4, 8 ); bar( rgb(0,100,200), "range", this.mob.prototype["range"], stat["range"], (font+2)*5, 8 ); bar( rgb(200,200,0), "as", this.mob.prototype["attackspeed"], stat["attackspeed"], (font+2)*6, 8 ); bar( rgb(100,0,200), "speed", this.mob.prototype["speed"], stat["speed"], (font+2)*7, 8 ); } } this.e[1]["mob"][i].draw(); } this.e[1][2].resize(); // LOADING ---------------- END this.e[1][1].div.menu = this; this.e[1][1].div.toggle = true; this.e[1][1].div.cur = 0; this.e[1][1].div.onclick = function() { var him = this.menu; var time = (new Date().getTime()); if ( time > this.cur ) { this.toggle = !this.toggle; if (this.toggle) { if (him.size( him.e[0][1].div ) >= 175) { this.cur = time+600; him.e[0][3].style( { "height":"173px" } ); setTimeout( function(){ him.e["menu"].style( { "MTop":"-175px" } ); }, 300 ); } else { this.cur = time+300; him.e["menu"].style( { "MTop":"-175px" } ); } him.e[1][1].transition( {"background-Color":0.5, "background-position":0.5} ) him.e[1][1].style( { "backgroundPosition":"-50% 0px" } ); setTimeout( function() { him.e[1][1].transition( {"background-Color":0.5, "background-position":0} ) him.e[1][1].style( { "backgroundPosition":"150% 0px", "backgroundImage":"url(./content/gui/open.png)" } ); setTimeout( function() { him.e[1][1].transition( {"background-Color":0.5, "background-position":0.5} ) him.e[1][1].style( { "backgroundPosition":"50% 0px" } ); }, 300 ); }, 300 ); him.e[0][4].style( { "height":"0px" } ); } else { this.cur = time+600; him.e["menu"].style( { "MTop":"0px" } ); him.e[1][1].transition( {"background-Color":0.5, "background-position":0.5} ) him.e[1][1].style( { "backgroundPosition":"-50% 0px" } ); setTimeout( function() { him.e[1][1].transition( {"background-Color":0.5, "background-position":0} ) him.e[1][1].style( { "backgroundPosition":"150% 0px", "backgroundImage":"url(./content/gui/close.png)" } ); setTimeout( function() { him.e[1][1].transition( {"background-Color":0.5, "background-position":0.5} ) him.e[1][1].style( { "backgroundPosition":"50% 0px" } ); }, 300 ); }, 300 ); setTimeout( function(){ him.e[0][0].div.rescale( him.e[0][1].div, 1 ); setTimeout( function(){ him.e[0][0].div.rescale( him.e[0][1].div, 2 ); }, 300 ); }, 300 ); } } } this.e[2] = {}; this.e[3] = {}; /*for(var i=0; i<20; i++) { this.add(); }*/ this.zindexc = 1; document.gamemenu.entity = this.e[2]; document.addEventListener("mousemove", function( e ) { var a = this.gamemenu.entity, c = this.gamemenu.menu; for(var i in a) { if (isset(a[i]) && a[i].drag) { var b = Math.max( 0, Math.min( c.size( c.e[0][1].div )-30, e.pageY - a[i].topOffset ) ); a[i].div.style.top = b+"px"; } } }, false ); document.addEventListener("mouseup", function( e ) { var a = this.gamemenu.entity, c = 0; for(var i in a) { c += 1; } for(var i in a) { if (isset(a[i]) && a[i].drag) { a[i].drag = false; a[i].transition( {"top":0.3} ); var b = parseInt(a[i].div.style.top); for(var v in a) { if (isset(a[v])) { if ( Math.round( b/25 ) < a[i].pos ) { if ( a[v].pos < a[i].pos && a[v].pos >= Math.round( b/25 ) ) { a[v].pos = Math.max( 0, Math.min( c-1, a[v].pos+1) ); } } else { if ( a[v].pos > a[i].pos && a[v].pos <= Math.round( b/25 ) ) { a[v].pos = Math.max( 0, Math.min( c-1, a[v].pos-1) ); } } } } a[i].pos = Math.max( 0, Math.min( c-1, Math.round( b/25 )) ); } } for(var i in a) { if (isset(a[i])) { a[i].div.style.top = (a[i].pos*25)+"px"; a[i].style( { "borderColor":rgb(0,0,0), "boxShadow":"0 0 0px "+rgb(0,0,0)} ); } } }, false ); } gamemenu.prototype.add = function( mobtype, number ) { var i = 0, c = 0; while ( isset(this.e[2][i]) ) { i += 1; } for(var v in this.e[2]) { if (isset(this.e[2][v])) { c = ( (this.e[2][v].pos >= c)? this.e[2][v].pos + 1 : c ); } }; this.e[3][i] = {}; this.e[2][i] = new create_div( {'p':this.e[0][1]} ); var col = rgb( 25, 25, 25 ) this.e[2][i].style( { "width":"calc(100% - 10px)", "height":"20px", "BColor":col, "M":"5px", "position":"absolute", "top":(c*25)+"px", "textAlign":"left", "lineHeight":"20px", "color":"white", "fontSize":"10px", "overflow":"hiddden" } ); this.e[2][i].div.entity = this.e[2]; this.e[2][i].div.entid = i; this.e[2][i].drag = false; this.e[2][i].pos = c; this.e[2][i].div.menu = this; this.e[2][i].transition( {"top":0.3, "box-shadow":0.3, "border-color":0.3, "background-color":0.3, "text-shadow":0.3} ); this.e[2][i].div.onmouseover = function() { if (!this.clicked) { this.style.backgroundColor = rgb(40,40,40) } } this.e[2][i].div.onmouseout = function() { if (!this.clicked) { this.style.backgroundColor = rgb(25,25,25) } } this.e[3][i][3] = new create_div( {'p':this.e[2][i]} ); this.e[3][i][3].style( { "width":"50%", "height":"100%", "float":"left", "*innerHTML":mob[mobtype].prototype.name+" "+number+"x", "PLeft":"10px" } ); this.e[3][i][3].div.entity = this.e[2]; this.e[3][i][3].div.entid = i; this.e[3][i][3].div.menu = this; this.e[3][i][3].count = number; this.e[3][i][3].mobtype = mobtype; this.e[3][i][3].div.onmousedown = function( e ) { this.entity[ this.entid ].drag = true; this.entity[ this.entid ].topOffset = e.pageY-parseInt(this.entity[ this.entid ].div.style.top); this.entity[ this.entid ].transition( {"top":0, "box-shadow":0.3, "border-color":0.3, "background-color":0.3, "text-shadow":0.3} ); this.entity[ this.entid ].style( { "borderColor":rgb(0,100,200), "boxShadow":"0 0 7px "+rgb(0,100,200)} ); this.entity[ this.entid ].div.style.zIndex = this.menu.zindexc; this.menu.zindexc += 1; } this.e[3][i][0] = new create_div( {'p':this.e[2][i]} ); this.e[3][i][0].style( { "width":"16px", "height":"16px", "BColor":rgb(200,0,0), "float":"right", "M":"2px", "background":"url(./content/gui/icon.png) 0px 0px", "backgroundSize":"64px 64px", "borderRadius":"10px" } ); this.e[3][i][0].transition( {"box-shadow":0.3, "border-color":0.3} ); this.e[3][i][0].div.onmouseover = function() { if (!this.clicked) { this.style.boxShadow = "0 0 4px "+rgb(200,0,0) } } this.e[3][i][0].div.onmouseout = function() { if (!this.clicked) { this.style.boxShadow = "0 0 0px "+rgb(0,0,0) } } this.e[3][i][0].div.menu = this; this.e[3][i][0].div.entid = i; this.e[3][i][0].div.onclick = function( e ) { var a = this.menu.e[2], c = 0; for(var i in a) { c += 1; } for(var i in a) { if ( isset(a[i]) ) { if ( a[i].pos > this.menu.e[2][this.entid].pos) { a[i].pos = a[i].pos-1; a[i].div.style.top = (a[i].pos*25)+"px"; } } } this.menu.e[2][ this.entid ].div.parentNode.removeChild( this.menu.e[2][ this.entid ].div ); this.menu.e[2][ this.entid ] = null; this.menu.e[0][0].div.rescale( this.menu.e[0][1].div ); } this.e[3][i][2] = new create_div( {'p':this.e[2][i]} ); this.e[3][i][2].style( { "width":"8px", "height":"8px", "BColor":rgb(200,0,0), "float":"right", "M":"6px", "borderRadius":"10px", "background":"url(./content/gui/icon.png) -16px 0px", "backgroundSize":"32px 32px", "MRight":"10px" } ); this.e[3][i][2].transition( {"box-shadow":0.3, "border-color":0.3, "margin":0.3} ); this.e[3][i][2].div.onmouseover = function() { if (!this.clicked) { this.style.boxShadow = "0 0 3px "+rgb(0,100,200) } } this.e[3][i][2].div.onmouseout = function() { if (!this.clicked) { this.style.boxShadow = "0 0 0px "+rgb(0,0,0) } } this.e[3][i][2].div.index = this.e[3][i][3]; this.e[3][i][2].div.entid = i; this.e[3][i][2].div.clicked = true; this.e[3][i][2].div.onclick = function() { this.index.count = Math.max( 1, this.index.count-1 ); this.index.div.innerHTML = this.index.mobtype+" "+this.index.count+"x"; /*if (this.clicked) { this.clicked = false; var self = this; self.style.marginLeft = "4px"; self.style.marginRight = "12px"; self.style.marginTop = "4px"; self.style.marginBottom = "8px"; setTimeout( function() { self.clicked = true; self.style.marginLeft = "6px"; self.style.marginRight = "10px"; self.style.marginTop = "6px"; self.style.marginBottom = "6px"; }, 300 ); }*/ } this.e[3][i][1] = new create_div( {'p':this.e[2][i]} ); this.e[3][i][1].style( { "width":"8px", "height":"8px", "BColor":rgb(200,0,0), "float":"right", "M":"6px", "borderRadius":"10px", "background":"url(./content/gui/icon.png) -8px 0px", "backgroundSize":"32px 32px", "MRight":"0px" } ); this.e[3][i][1].transition( {"box-shadow":0.3, "border-color":0.3, "margin":0.3} ); this.e[3][i][1].div.onmouseover = function() { if (!this.clicked) { this.style.boxShadow = "0 0 3px "+rgb(0,200,100) } } this.e[3][i][1].div.onmouseout = function() { if (!this.clicked) { this.style.boxShadow = "0 0 0px "+rgb(0,0,0) } } this.e[3][i][1].div.index = this.e[3][i][3]; this.e[3][i][1].div.entid = i; this.e[3][i][1].div.clicked = true; this.e[3][i][1].div.onclick = function() { this.index.count = Math.max( 1, this.index.count+1 ); this.index.div.innerHTML = mob[this.index.mobtype].prototype.name+" "+this.index.count+"x"; /*if (this.clicked) { this.clicked = false; var self = this; self.style.marginLeft = "4px"; self.style.marginRight = "2px"; self.style.marginTop = "4px"; self.style.marginBottom = "8px"; setTimeout( function() { self.clicked = true; self.style.marginLeft = "6px"; self.style.marginRight = "0px"; self.style.marginTop = "6px"; self.style.marginBottom = "6px"; }, 300 ); }*/ } if (!this.e[1][1].div.toggle) { this.e[0][0].div.rescale( this.e[0][1].div ); } else { this.e[0][2].style( { "height":Math.min(100, 100*(this.e[0][0].div.offsetHeight/this.size( this.e[0][1].div )))+"%" } ); this.e[0][2].resize(); } return (i); } gamemenu.prototype._get = function( ) { var list = {}, c = 0; for(var i in this.e[3]) { if ( isset(this.e[3][i][3]) && isset(this.e[2][i]) ) { list[c++] ={ "t":parseInt(this.e[2][i].div.style.top), 'c':this.e[3][i][3] } } } for(var i in list) { for(var v in list) { if ( list[i].t < list[v].t) { var tmp = list[i]; list[i] = list[v]; list[v] = tmp; } } } return (list); } gamemenu.prototype.size = function( p ) { var a = p.children; var c = 0, l = 0; for(var i in a) { if ( isset(a[i].tagName) ) { l = parseInt(a[i].style.margin); c += a[i].offsetHeight+l; } } return ( c+l ); }
import React, {useEffect, useRef, useState} from 'react' import PropTypes from 'prop-types' import {connect} from 'react-redux' import {Authentication} from "../../../../../inc/redux/actions/login/Authentication"; import ElementModal from "./ElementModal"; const ModalBadge = (props) => { /** * @define - Params in props */ let {title, menus, opt_switch, status} = props const RefModal = useRef() useEffect(()=> { if (!status){ RefModal.current.classList.remove("active") }else{ RefModal.current.classList.add("active") } }) const ElementOpt = (opt_switch,menus)=>{ switch (opt_switch){ case "msg": return <ElementModal opt="msg" menus={menus}/> case "cart": return <ElementModal opt="cart" menus={menus}/> case "notify": return <ElementModal opt="notify" menus={menus}/> case "form": return <ElementModal opt="form" menus={menus}/> } } return( <div className="modal modal-badge hero" ref={RefModal}> <div className="modal-hero"> <div className="modal-hero__title flex"> <h3 className="modal-title badge">{title}</h3> <button type="button" title="modal-close" className="modal-hero__btn"> <i className="mdi mdi-close"/> </button> </div> <div className="modal-hero__content"> {ElementOpt(opt_switch,menus)} </div> </div> </div> ) } ModalBadge.propTypes ={ Authentication: PropTypes.func.isRequired } const mapStateToProps = state => ({ }) export default connect(mapStateToProps, {Authentication})(ModalBadge)
const app = require('./api.js'); /*creation du server sur le port par defaut */ const port = process.env.PORT || 3000; app.listen(port, () => { console.log(`Server is running on port: ${port} `); });
var t = getApp(), e = t.requirejs("core"); let animationShowHeight = 300; Page({ /*** 页面的初始数据*/ info1: "", data: { result: '', // input默认是1 num: 1, // 使用data数据对象设置样式名 imageHeight: 0, imageWidth: 0, shop: { name: '潘思', logo: '', img: '', goodscount: '33' }, shopgoods: [ { id: '1', thumb: "/static/images/football.png", title: '潘思', marketprice: '88', }, { id: '2', thumb: "/static/images/football.png", title: 'shabi', marketprice: '88', } ], indexrecommands: [ { id: '3', thumb: "/static/images/football.png", title: '潘思', marketprice: '88', }, { id: '4', thumb: "/static/images/football.png", title: 'shabi', marketprice: '88', } ], image2: "/static/images/gouwu.png", laba: '/static/images/laba.png', redian: '/static/images/redian.jpg', img: '/static/images/football.png', img2: '/static/images/volleyball-1.png', img3: '/static/images/basketball-1.png', img4: '/static/images/frisbee-1.png', img5: '/static/images/che.png', mid: '', }, imageLoad: function (e) { this.setData({ imageHeight: e.detail.height, imageWidth: e.detail.width }); }, onLoad: function (options) { // 页面初始化 options为页面跳转所带来的参数 var that = this //访问别人店铺用的参数 that.setData({ mid: options.mid }) that.getshop(); /*** 获取系统信息 */ wx.getSystemInfo({ success: function (res) { that.setData({ winWidth: res.windowWidth, winHeight: res.windowHeight }); } }) }, getshop: function () { var t = this; e.get("commission/getmyshop", {}, function (e) { if (7e4 == e.error) return void wx.redirectTo({ url: "/pages/commission/register/index" }); console.log('获取小店信息', e) //console.log('开启自选', e.shop.selectgoods) t.setData({ shop: e.shop }) t.setData({ shopgoods: e.shopgoods }) t.setData({ indexrecommands: e.indexrecommands }) }) }, scanCode: function () { var that = this wx.scanCode({ success: function (res) { that.setData({ result: res.result }) }, fail: function (res) { } }) }, /*** 生命周期函数--监听页面初次渲染完成*/ onReady: function () { }, /*** 生命周期函数--监听页面显示*/ onShow: function () { }, /*** 生命周期函数--监听页面隐藏*/ onHide: function () { }, /*** 生命周期函数--监听页面卸载*/ onUnload: function () { }, /*** 页面相关事件处理函数--监听用户下拉动作*/ onPullDownRefresh: function () { }, /*** 页面上拉触底事件的处理函数*/ onReachBottom: function () { }, /*** 用户点击右上角分享*/ onShareAppMessage: function () { } })
import { createStore } from 'redux'; import initialState from './initialState'; function reducer(state, action) { switch(action.type) { case 'switched': return { value: action.value }; default: return state; } } const store = createStore(reducer, initialState); export default store;
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class CannonBodyConfig extends SupCore.Data.Base.ComponentConfig { constructor(pub) { super(pub, CannonBodyConfig.schema); } static create() { const emptyConfig = { formatVersion: CannonBodyConfig.currentFormatVersion, mass: 0, fixedRotation: false, group: 1, mask: 1, shape: "box", positionOffset: { x: 0, y: 0, z: 0 }, orientationOffset: { x: 0, y: 0, z: 0 }, halfSize: { x: 0.5, y: 0.5, z: 0.5 }, radius: 1, height: 1, segments: 16 }; return emptyConfig; } static migrate(pub) { if (pub.formatVersion === CannonBodyConfig.currentFormatVersion) return false; if (pub.formatVersion == null) { pub.formatVersion = 1; if (pub.offsetX != null) { pub.positionOffset = { x: pub.offsetX, y: pub.offsetY, z: pub.offsetZ, }; delete pub.offsetX; delete pub.offsetY; delete pub.offsetZ; } if (pub.halfWidth != null) { pub.halfSize = { x: pub.halfWidth, y: pub.halfHeight, z: pub.halfDepth }; delete pub.halfWidth; delete pub.halfHeight; delete pub.halfDepth; } } if (pub.formatVersion === 1) { if (pub.offset != null) { pub.positionOffset = pub.offset; delete pub.offset; } pub.orientationOffset = { x: 0, y: 0, z: 0 }; pub.segments = 16; pub.group = 1; pub.mask = 1; pub.formatVersion = 2; } return true; } } CannonBodyConfig.schema = { formatVersion: { type: "integer" }, mass: { type: "number", min: 0, mutable: true }, fixedRotation: { type: "boolean", mutable: true }, group: { type: "number", mutable: true }, mask: { type: "number", mutable: true }, shape: { type: "enum", items: ["box", "sphere", "cylinder"], mutable: true }, positionOffset: { mutable: true, type: "hash", properties: { x: { type: "number", mutable: true }, y: { type: "number", mutable: true }, z: { type: "number", mutable: true }, } }, orientationOffset: { mutable: true, type: "hash", properties: { x: { type: "number", mutable: true }, y: { type: "number", mutable: true }, z: { type: "number", mutable: true } } }, halfSize: { mutable: true, type: "hash", properties: { x: { type: "number", min: 0, mutable: true }, y: { type: "number", min: 0, mutable: true }, z: { type: "number", min: 0, mutable: true }, } }, radius: { type: "number", min: 0, mutable: true }, height: { type: "number", min: 0, mutable: true }, segments: { type: "number", min: 3, mutable: true } }; CannonBodyConfig.currentFormatVersion = 2; exports.default = CannonBodyConfig;
/* Copyright (c) 2010 Mike Desjardins Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERWISE LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ var Social = { _source : "buzzbird", service : function(servicename) { var result = null; switch(servicename) { case "twitter": result = new Twitter(); break; case "identi.ca": result = new Identica(); break; default: throw "Unsupported service." } return result; } };
const mongoose = require('mongoose'); const express = require("express"); const router = express.Router(); const users = require("./users.js"); const User = users.model; const validUser = users.valid; const postSchema = new mongoose.Schema({ userID: String, personID: String, title: String, contents: String, time: String }); const Post = mongoose.model('Post', postSchema); router.post("/", validUser, async(req, res) => { console.log("post called"); try { const post = new Post({ userID: req.user._id, personID: req.body.personID, title: req.body.title, contents: req.body.contents, time: req.body.time }); await post.save(); console.log("Post saved!"); return res.sendStatus(200); } catch (error) { console.log(error); return res.sendStatus(500); } }); router.get("/:id", validUser, async(req, res) => { try { let posts = await Post.find({ personID: req.params.id, }).sort({ created: -1 }); console.log(req.body) console.log(req.body.personID); console.log(posts); return res.send(posts); } catch (error) { console.log(error); return res.sendStatus(500); } } ); router.put("/:id", validUser, async(req, res) => { try{ let post = await Post.findOne({ _id: req.params.id }); post.title = req.body.title; post.contents = req.body.description; post.time = req.body.time; await post.save(); res.sendStatus(200); } catch (error) { console.log(error); return res.sendStatus(500); } }); router.delete("/:id", validUser, async(req, res) => { try{ await Post.deleteOne({ _id: req.params.id }); res.sendStatus(200); } catch (error) { console.log(error); return res.sendStatus(500); } }); module.exports = { model: Post, routes: router, }
const styles = { root: { flexGrow: 1, }, appBar: { backgroundColor: "transparent" }, menu: { color: "black" } }; export default styles;
// @flow import * as React from 'react'; import renderer from 'react-test-renderer'; import { VisaInformation } from '../VisaInformation'; import VisaOk from '../VisaOk'; import VisaRequired from '../VisaRequired'; import VisaWarning from '../VisaWarning'; const defaultProps = { requiredIn: [], warningIn: [], isPastBooking: false, }; describe('VisaInformation', () => { it('renders null for past bookings', () => { const props = { ...defaultProps, isPastBooking: true, }; const wrapper = renderer.create( <VisaInformation {...props}>{false}</VisaInformation>, ); expect(wrapper.toTree().rendered).toBe(null); }); it('renders visa ok when requiredIn and warningIn contains no elements', () => { const wrapper = renderer.create( <VisaInformation {...defaultProps}> <VisaRequired countries={[]} /> <VisaWarning countries={[]} /> </VisaInformation>, ); expect(wrapper.root.findByType(VisaOk)).toBeDefined(); expect(() => { wrapper.root.findByType(VisaRequired); }).toThrow(); expect(() => { wrapper.root.findByType(VisaWarning); }).toThrow(); }); it('renders visa warning and visa required when they contain elements', () => { const props = { ...defaultProps, requiredIn: ['Norway'], warningIn: ['Norway'], }; const wrapper = renderer.create( <VisaInformation {...props}> <VisaRequired countries={['Norway']} /> <VisaWarning countries={['Norway']} /> </VisaInformation>, ); expect(wrapper.root.findByType(VisaRequired)).toBeDefined(); expect(wrapper.root.findByType(VisaWarning)).toBeDefined(); expect(() => { wrapper.root.findByType(VisaOk); }).toThrow(); }); });
function isEmail(str){ var reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/; return reg.test(str); } function isValidURL(url){ var RegExp = "^(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_\+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?"; if(RegExp.test(url)){ return true; }else{ return false; } } function nameValidate(){ var name = $(":input[name='name']").val(); $(".name").text(""); if(!name){ $(".name").text("这个字段是必填项"); return false; } return true; } function emailValidate(){ var email = $(":input[name='email']").val(); $(".email").text(""); if(!email){ $(".email").text("这个字段是必填项"); return false; } else if(!isEmail(email)){ $(".email").text("无效的邮箱地址"); return false; } return true; } function commentValidate(){ var comment = $("textarea").val(); $(".comment").text(""); if(!comment){ $(".comment").text("这个字段是必填项"); return false; } return true; } function urlValidate(){ var url = $(":input[name='url']").val(); $(".url").text(""); if(url&&!isValidURL(url)){ $(".url").text("无效的URL地址"); return false; } return true; } function bindPostCommentHandler() { $('.reply').click(function(){ $(".close").click(); var id = $(this).attr("name"); var cname = "#cname" + id; var ccomment = "#ccomment" + id; var rName = $(cname).text(); var rContent = $(ccomment).text(); var user = "<h4 id='replyname'>" + rName + "</h4>"; var content = "<div id='replycontent'>" + rContent + "</div>"; var reply='<div class="alert alert-info alert-reply .alert-block"></div>'; var close = '<button type="button" class="close" data-dismiss="alert">&times;</button>'; $("#replycontent").append(reply); $(".alert-reply").append(close); $(".alert-reply").append(user); $(".alert-reply").append(content); $(":input[name='rName']").val(rName); $(":input[name='rContent']").val(rContent); }); $(".close").click(function(){ $(":input[name='rName']").val(""); $(":input[name='rContent']").val(""); }); $(":input[name='name']").blur(function(){ nameValidate(); }); $(":input[name='email']").blur(function(){ emailValidate(); }); $(":input[name='url']").blur(function(){ urlValidate(); }); $("textarea").blur(function(){ commentValidate(); }); $("#comment_form form").submit(function(e){ nameValidate(); emailValidate(); urlValidate(); commentValidate(); if(!(nameValidate()&&emailValidate()&&commentValidate()&&urlValidate())) e.preventDefault(); }); } $(document).ready(function() { bindPostCommentHandler(); });
import React, { Component } from 'react'; import TextField from 'material-ui/TextField'; import Button from 'material-ui/Button'; import { withStyles } from 'material-ui/styles'; import background from './background.jpg'; import CallContainer from './CallContainer'; import Draggable from 'react-draggable'; import { CircularProgress } from 'material-ui/Progress'; import Urlbox from 'urlbox'; import Controls from './Forms/CustomPage'; import { Item } from './FlexComponents'; import Typography from 'material-ui/Typography'; import WidgetContainer from './WidgetContainer'; import ReactGA from 'react-ga'; // Plugin your API key and secret const urlbox = Urlbox('uyxmHTVQwumo6PKD', '3d74f6cee5b34eada3893332bd66579b'); const ciscoImg = 'https://api.urlbox.io/v1/uyxmHTVQwumo6PKD/png?full_page=true&user_agent=desktop&url=https%3A%2F%2Fwww.cisco.com&retina=true&width=700'; const styles = theme => ({ root: { display: 'flex', flexDirection: 'row', flexWrap: 'wrap', justifyContent: 'center', alignItems: 'stretch', alignContent: 'stretch', height: '100%', position: 'relative', }, formContainer: { margin: 'auto', flex: '0 0 66%', padding: '5px', }, button: { }, iframe: { margin: 'auto', padding: '5px', flex: '0 0 90%', border: 'none', }, flexItem: { margin: 'auto', padding: '5px', flex: '1 1 90%', position: 'relative', visibility: 'visible', border: '1px solid black', }, overlayStyle: { position: 'absolute', right: '15px', top: '15px', margin: '10px', // width: '25%', }, progress: { position: 'absolute', width: '100%', height: '100%', textAlign: 'center', top: '80px', zIndex: 10, }, hidden: { margin: 'auto', padding: '5px', flex: '1 1 90%', position: 'relative', visibility: 'hidden', border: '1px solid black', }, show: { visibility: 'visible' }, }); class SubPage extends Component { constructor(props) { super(props); this.state = { baseUrl: '', loading: false, config: false, mayday: false, callString: '', spaceString: '', callSize: '25%', widget: false, }; } componentDidUpdate = (prevProps, prevState) => { const w = window.innerWidth * .9; const options = { url: this.state.baseUrl, retina: false, format: 'png', width: w, height: w * 2, }; if (this.imgInput) { this.imgInput.src = urlbox.buildUrl(options); } } handleChange = name => event => { this.setState({ [name]: event.target.value }); }; handlePage = event => { // Set your options this.startLoading(); const w = window.innerWidth * .9; const options = { url: this.state.baseUrl, retina: false, format: 'png', width: w, }; this.imgInput.src = urlbox.buildUrl(options); }; handleSubmit = (config, event) => { // Set your options ReactGA.event({ category: 'Brand', action: 'Applied' }); this.startLoading(); this.setState(state => ({ baseUrl: config.baseUrl, callString: config.callString, spaceString: config.spaceString, mayday: config.mayday, callSize: config.callSize || '25%', widget: config.widget, config: true, })); }; stopLoading = () => this.setState(state => ({ loading: false })); startLoading = () => this.setState(state => ({ loading: true })); handleError = event => { this.stopLoading(); this.setState({ config: false }); this.imgInput.src = ciscoImg; } render() { const { classes } = this.props; const { mayday, callString, loading, config, spaceString } = this.state; return ( <div className={classes.root} > {loading && ( <div className={classes.progress}> <CircularProgress size={100} /> <Typography type="subheading"> Be Patient this part takes a while... </Typography> </div>)} {!config && <Controls onSubmit={this.handleSubmit} />} {config && ( <div className={classes.formContainer}> <Item> <Button color='primary' raised onClick={e => { this.setState({ config: false, loading: false }) }}> Back </Button> </Item> </div> )} {config && ( <div className={loading ? classes.hidden : classes.flexItem}> <img onLoad={this.stopLoading} onError={this.handleError} alt='' src={ciscoImg} width='100%' ref={(input) => { this.imgInput = input; }} /> <CallContainer mayday={mayday} callString={callString} spaceString={spaceString} className={classes.overlayStyle} style={{ width: this.state.callSize }} widgetSize={this.state.callSize} widget={this.state.widget} /> </div> )} </div> ) } } export default withStyles(styles)(SubPage);
import { shallowMount } from '@vue/test-utils'; import Vue from 'vue'; import Vuetify from 'vuetify'; import VueRouter from 'vue-router'; import Signup from '../../src/components/Signup.vue'; import TermsOfServiceModal from '../../src/components/TermsOfServiceModal.vue'; // Store. import store from '../Store.js'; Vue.use(VueRouter); Vue.use(Vuetify); describe('Signup', () => { it('is a Vue instance', () => { const wrapper = shallowMount(Signup, { mocks: { $store: store } }); expect(wrapper.isVueInstance()).toBeTruthy(); }); it('is data a function', () => { expect(typeof Signup.data).toBe('function'); }); it('has data correct data types', () => { expect(Signup.data()).toEqual({ stepNumber: expect.any(Number), isFormValid: expect.any(Boolean), name: expect.any(String), nameRules: expect.any(Array), lastname: expect.any(String), lastnameRules: expect.any(Array), email: expect.any(String), emailRules: expect.any(Array), password: expect.any(String), passwordConfirmation: expect.any(String), showPassword: expect.any(Boolean), showPasswordConfirmation: expect.any(Boolean), passwordRules: expect.any(Object), genderSelectorRules: expect.any(Object), terms: expect.any(Boolean), doesAgree: expect.any(Boolean), emailNewContent: expect.any(Boolean), emailCommentPost: expect.any(Boolean), emailReplyComment: expect.any(Boolean), }); }); it('is methods an Object', () => { expect(typeof Signup.methods).toBe('object'); }); it('has required methods', () => { expect(Signup.methods).toEqual({ blurInput: expect.any(Function), signup: expect.any(Function), validate: expect.any(Function), checkPasswordChange: expect.any(Function), doPasswordsMatch: expect.any(Function) }); }); it('is components an Object', () => { expect(typeof Signup.components).toBe('object'); }); it('has correct components', () => { expect(Signup.components).toEqual({ TermsOfServiceModal }); }); it('are all components a Vue component', () => { const wrapper = shallowMount(TermsOfServiceModal, { propsData: { agree: true, showTerms: true } }); expect(wrapper.isVueInstance()).toBeTruthy(); }); });
const assert = require('assert') const crypto = require('crypto') const { createWebAPIRequest } = require('../util/util') describe('测试获取总榜', () => { it('retcode should be 1', done => { const data = {} const cookie = '' createWebAPIRequest( 'music.qq.com', '/musicbox/shop/v3/data/hit/hit_all.js', 'GET', data, cookie, music_req => { assert(music_req.includes('retcode:"1"')) done() }, err => { done(err) } ) }) })
import React, { Component } from 'react'; import { connect } from 'react-redux'; import DialogTitle from '@material-ui/core/DialogTitle'; import DialogContent from '@material-ui/core/DialogContent'; import moment from 'moment'; import DialogActions from '@material-ui/core/DialogActions'; import Button from '@material-ui/core/Button'; import { updateMatchStatus } from '../../actions/matches'; import Typography from '@material-ui/core/Typography'; import Box from '@material-ui/core/Box'; import Stepper from '@material-ui/core/Stepper'; import Step from '@material-ui/core/Step'; import StepButton from '@material-ui/core/StepButton'; import { GoogleMap, LoadScript, Marker } from '@react-google-maps/api'; import MuiAlert from '@material-ui/lab/Alert'; class MatchModal extends Component { constructor(props) { super(props); this.state = { activeStep: 0, }; this.apiKey = process.env.REACT_APP_GOOGLE_API_KEY; } componentDidUpdate(prevProps, prevState, snapshot) { if ((prevProps.isUpdatingMatch && !this.props.isUpdatingMatch) || (prevProps.match && !this.props.match)) { this.props.closeModal(); } } handleStep = (index) => () => { this.setState({ activeStep: index }); }; render() { if (!this.props.match) { return <></>; } const expectedStartTime = moment(this.props.match.startTime).format('MM/DD/YYYY HH:mm'); const expectedFirstArrival = moment(this.props.match.estimatedInnerStartTime).format('MM/DD/YYYY HH:mm'); const expectedSecondArrival = moment(this.props.match.estimatedInnerArrivalTime).format('MM/DD/YYYY HH:mm'); const expectedThirdArrival = moment(this.props.match.estimatedOuterArrivalTime).format('MM/DD/YYYY HH:mm'); const amIDriver = this.props.match.outerShipment.id === this.props.shipmentInstance.id; const otherShipment = amIDriver ? this.props.match.innerShipment : this.props.match.outerShipment; const otherCompany = otherShipment.companyInstance.name; const hasConfirmed = amIDriver ? this.props.match.outerShipmentConfirmed : this.props.match.innerShipmentConfirmed; const isOngoing = this.props.match.status === 1; const firstOrigin = this.props.match.outerShipment.origin; const secondOrigin = this.props.match.innerShipment.origin; const firstDestination = this.props.match.innerShipment.destination; const secondDestination = this.props.match.outerShipment.destination; const locations = [firstOrigin, secondOrigin, firstDestination, secondDestination]; const times = [expectedStartTime, expectedFirstArrival, expectedSecondArrival, expectedThirdArrival]; const positions = locations.map((loc) => ({ lat: loc.latitude, lng: loc.longitude })); const stepContent = locations.map((loc, index) => ( <> Address: <strong>{loc.address}</strong> <br /> Time: <strong>{times[index]}</strong> </> )); const stepLabels = ['Driver origin', 'Pickup origin', 'Pickup destination', 'Driver destination']; const mapOptions = { draggable: false, disableDefaultUI: true, }; const activeLocation = positions[this.state.activeStep]; return ( <> <DialogTitle>Match with {otherCompany}</DialogTitle> <Box component={DialogContent} display="flex" flexDirection="column" justifyContent="center" alignItems="center"> <MuiAlert variant="filled" severity="info"> {amIDriver ? 'You are the chosen driver for this match' : 'You are not the chosen driver for this match'} </MuiAlert> <Stepper nonLinear activeStep={this.state.activeStep}> {stepLabels.map((label, index) => ( <Step key={index}> <StepButton onClick={this.handleStep(index)}>{label}</StepButton> </Step> ))} </Stepper> <Box p={2} bgcolor="primary.light"> <Box p={1} boxShadow={1} bgcolor="white"> <Box p={2}> <Typography variant="body2">{stepContent[this.state.activeStep]}</Typography> </Box> <Box m={1}> <LoadScript googleMapsApiKey={this.apiKey}> <GoogleMap mapContainerStyle={{ width: '400px', height: '400px' }} zoom={15} center={activeLocation} options={mapOptions}> <Marker position={activeLocation} /> </GoogleMap> </LoadScript> </Box> </Box> </Box> </Box> <DialogActions> {isOngoing && ( <Box component={Typography} variant="subtitle2" color="success.main" p={1}> Ongoing </Box> )} {!isOngoing && hasConfirmed && ( <Box component={Typography} variant="subtitle2" color="success.main" p={1}> Waiting for other part to confirm </Box> )} {!isOngoing && !hasConfirmed && ( <> <Button color="primary" onClick={() => this.props.confirmMatch(this.props.match.id)}> Confirm </Button> <Button onClick={() => this.props.rejectMatch(this.props.match.id)}>Deny</Button> </> )} </DialogActions> </> ); } } const mapStateToProps = (state, ownProps) => ({ match: state.matches.list.find((m) => m.id === ownProps.matchId), isUpdatingMatch: state.matches.isUpdating, }); const mapDispatchToProps = (dispatch) => ({ confirmMatch: (matchId) => dispatch(updateMatchStatus({ id: matchId, status: 1 })), rejectMatch: (matchId) => dispatch(updateMatchStatus({ id: matchId, status: 2 })), }); export default connect(mapStateToProps, mapDispatchToProps)(MatchModal);
module.exports = (data) => { data.remove(); };
/*!@preserve * OnceDoc */ //加载各种模块 var Article = require('./blog.article') // 文章列表,内容显示 var Root = require('./blog.root') // 文章编辑、保存管理 app.mod('blog', '../web') app.pre('/blog', '.tmpl') /*BLOG MENU*/ global.ONCEOS_DESKTOP_MENU.push({ text : LOCAL.BLOG , icon : '/blog/img/blog.png' , href : '/blog/home' , target : '_blank' }) global.ONCEOS_SUB_MENU_APP.nodes.push({ text : LOCAL.BLOG , icon : '/blog/img/blog.png' , href : '/blog/home' }) global.ONCEDOC_NAVS.push({ text : LOCAL.BLOG , href : '/blog/home' , target : '_blank' }) global.ONCEDOC_HOMEPAGE.push('/blog') global.OnceDoc.Blog = { Article : Article , Root : Root } oncedb.schema('article', { "id" : "id" , "title" : "" , "description" : "" , "url" : "url" , "summary" : "" , "slides" : "object" , "file" : "" , "content" : "" , "keyword" : "keywords('key', this.pubTime || +new Date())" , "poster" : "index('user_article', this.pubTime || +new Date())" , "avatar" : "" , "isPublic" : "index('public', this.pubTime || +new Date())" , "pubTime" : "int;order('article_pub')" , "visitNum" : "int;order('article_visit');default(0)" , "postTime" : "int;order('article_post')" , "mtime" : "int;order('article_mtime');default(Date.now())" , "similar" : "object" , "hottest" : "object" }) /* sitemap for SEO */ var SITEMAPS = [ '' , 'blog/home' ] app.get('/sitemap.txt', function(req, res) { oncedb.client.zrevrange('public:1', 0, 50000, function(err, keys) { if (err) { res.render('/blog/sitemap.txt', { keys: SITEMAPS }) return } var urls = keys.map(function(key) { return 'blog/view/' + key }).concat(SITEMAPS) res.render('/blog/sitemap.txt', { keys: urls }) }) })
import store from "../store/store"; import { Redirect } from "react-router-dom"; import React from "react"; export const checkAndRedirect = (component, shouldBeAuth = true) => { const user = store.getState().user; if (shouldBeAuth) return user ? component : <Redirect to="/login"/>; return !user ? component : <Redirect to="/"/>; };
/** *! -*-*-*-*-*-*- Express Contact Router -*-*-*-*-*-*- */ // Express Router Import const contactRouter = require('express').Router() // import route controller const contactController = require('../RouterController/contactRouterController') // import authenticate JSON Web Token file const authenticate = require('../verifyToken/authenticate') // example.com/api/contact/ --> GET contactRouter.get('/', contactController.getAllContactController) // example.com/api/contact/ --> POST contactRouter.post('/', authenticate, contactController.postAllContactController) // example.com/api/contact/postID --> View Single Contact Router contactRouter.get('/:postID', contactController.singleContactController) // example.com/api/contact/postID --> PUT contactRouter.put('/:postID', authenticate, contactController.contactUpdateController) // example.com/api/contact/postID --> DELETE contactRouter.delete('/:postID', authenticate, contactController.contactDeleteController) module.exports = contactRouter
// @flow strict import * as React from 'react'; import { View } from 'react-native'; import { Translation } from '@kiwicom/mobile-localization'; import { StyleSheet, TextIcon, Text } from '@kiwicom/mobile-shared'; import { defaultTokens } from '@kiwicom/mobile-orbit'; type RowTitle = React.Element<typeof Translation>; type Cell = React.Element<typeof Translation | typeof TextIcon>; type RowData = {| +title: RowTitle, +travelBasic: Cell, +travelPlus: Cell, |}; type RowProps = {| +data: RowData, +index: number, |}; const Row = (props: RowProps) => { const backgroundColor = props.index % 2 === 1 ? styles.wrapperBackground : null; const headerColor = props.index === 0 ? styles.headerColor : null; return ( <View style={[styles.rowWrapper, backgroundColor]}> <View style={styles.cellWrapper}> <Text style={[styles.textBold, headerColor]}>{props.data.title}</Text> </View> <View style={styles.cellWrapper}> <Text style={[styles.smallerFont, styles.textCentered, headerColor]}> {props.data.travelBasic} </Text> </View> <View style={styles.cellWrapper}> <Text style={[styles.smallerFont, styles.textCentered, headerColor]}> {props.data.travelPlus} </Text> </View> </View> ); }; export default Row; const styles = StyleSheet.create({ rowWrapper: { flexDirection: 'row', alignItems: 'center', paddingVertical: 15, }, wrapperBackground: { backgroundColor: defaultTokens.paletteCloudLight, }, cellWrapper: { flex: 1, paddingStart: 4, paddingEnd: 4, }, smallerFont: { fontSize: 10, }, textBold: { fontSize: 11, fontWeight: 'bold', }, textCentered: { textAlign: 'center', }, headerColor: { color: defaultTokens.paletteInkLight, fontWeight: 'bold', }, });
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; import _extends from "@babel/runtime/helpers/esm/extends"; var _excluded = ["accessKey", "activeStateEnabled", "children", "disabled", "focusStateEnabled", "height", "hint", "hoverStateEnabled", "icon", "iconPosition", "onClick", "onContentReady", "onKeyDown", "onSubmit", "pressed", "rtlEnabled", "stylingMode", "tabIndex", "template", "text", "type", "useInkRipple", "useSubmitBehavior", "validationGroup", "visible", "width"]; import { createVNode, createComponentVNode, normalizeProps } from "inferno"; import { InfernoEffect, InfernoWrapperComponent } from "@devextreme/vdom"; import { createDefaultOptionRules, convertRulesToOptions } from "../../core/options/utils"; import devices from "../../core/devices"; import { isMaterial, current } from "../../ui/themes"; import { click } from "../../events/short"; import { combineClasses } from "../utils/combine_classes"; import { getImageSourceType } from "../../core/utils/icon"; import { Icon } from "./common/icon"; import { InkRipple } from "./common/ink_ripple"; import { Widget } from "./common/widget"; import { BaseWidgetProps } from "./common/base_props"; var stylingModes = ["outlined", "text", "contained"]; var getCssClasses = model => { var { icon, iconPosition, stylingMode, text, type } = model; var isValidStylingMode = stylingMode && stylingModes.indexOf(stylingMode) !== -1; var classesMap = { "dx-button": true, ["dx-button-mode-".concat(isValidStylingMode ? stylingMode : "contained")]: true, ["dx-button-".concat(type || "normal")]: true, "dx-button-has-text": !!text, "dx-button-has-icon": !!icon, "dx-button-icon-right": iconPosition !== "left" }; return combineClasses(classesMap); }; export var viewFunction = viewModel => { var { children, icon, iconPosition, template: ButtonTemplate, text } = viewModel.props; var renderText = !viewModel.props.template && !children && text; var isIconLeft = iconPosition === "left"; var iconComponent = !viewModel.props.template && !children && viewModel.iconSource && createComponentVNode(2, Icon, { "source": viewModel.iconSource, "position": iconPosition }); return normalizeProps(createComponentVNode(2, Widget, _extends({ "accessKey": viewModel.props.accessKey, "activeStateEnabled": viewModel.props.activeStateEnabled, "aria": viewModel.aria, "classes": viewModel.cssClasses, "disabled": viewModel.props.disabled, "focusStateEnabled": viewModel.props.focusStateEnabled, "height": viewModel.props.height, "hint": viewModel.props.hint, "hoverStateEnabled": viewModel.props.hoverStateEnabled, "onActive": viewModel.onActive, "onContentReady": viewModel.props.onContentReady, "onClick": viewModel.onWidgetClick, "onInactive": viewModel.onInactive, "onKeyDown": viewModel.onWidgetKeyDown, "rtlEnabled": viewModel.props.rtlEnabled, "tabIndex": viewModel.props.tabIndex, "visible": viewModel.props.visible, "width": viewModel.props.width }, viewModel.restAttributes, { children: createVNode(1, "div", "dx-button-content", [viewModel.props.template && ButtonTemplate({ data: { icon, text } }), !viewModel.props.template && children, isIconLeft && iconComponent, renderText && createVNode(1, "span", "dx-button-text", text, 0), !isIconLeft && iconComponent, viewModel.props.useSubmitBehavior && createVNode(64, "input", "dx-button-submit-input", null, 1, { "type": "submit", "tabIndex": -1 }, null, viewModel.submitInputRef), viewModel.props.useInkRipple && createComponentVNode(2, InkRipple, { "config": viewModel.inkRippleConfig }, null, viewModel.inkRippleRef)], 0, null, null, viewModel.contentRef) }), null, viewModel.widgetRef)); }; export var ButtonProps = _extends({}, BaseWidgetProps, { activeStateEnabled: true, hoverStateEnabled: true, icon: "", iconPosition: "left", text: "", useInkRipple: false, useSubmitBehavior: false, validationGroup: undefined }); export var defaultOptionRules = createDefaultOptionRules([{ device: () => devices.real().deviceType === "desktop" && !devices.isSimulator(), options: { focusStateEnabled: true } }, { device: () => isMaterial(current()), options: { useInkRipple: true } }]); import { createRef as infernoCreateRef } from "inferno"; var getTemplate = TemplateProp => TemplateProp && (TemplateProp.defaultProps ? props => normalizeProps(createComponentVNode(2, TemplateProp, _extends({}, props))) : TemplateProp); export class Button extends InfernoWrapperComponent { constructor(props) { super(props); this.state = {}; this.contentRef = infernoCreateRef(); this.inkRippleRef = infernoCreateRef(); this.submitInputRef = infernoCreateRef(); this.widgetRef = infernoCreateRef(); this.contentReadyEffect = this.contentReadyEffect.bind(this); this.focus = this.focus.bind(this); this.onActive = this.onActive.bind(this); this.onInactive = this.onInactive.bind(this); this.onWidgetClick = this.onWidgetClick.bind(this); this.onWidgetKeyDown = this.onWidgetKeyDown.bind(this); this.submitEffect = this.submitEffect.bind(this); } createEffects() { return [new InfernoEffect(this.contentReadyEffect, [this.props.onContentReady]), new InfernoEffect(this.submitEffect, [this.props.onSubmit, this.props.useSubmitBehavior])]; } updateEffects() { var _this$_effects$, _this$_effects$2; (_this$_effects$ = this._effects[0]) === null || _this$_effects$ === void 0 ? void 0 : _this$_effects$.update([this.props.onContentReady]); (_this$_effects$2 = this._effects[1]) === null || _this$_effects$2 === void 0 ? void 0 : _this$_effects$2.update([this.props.onSubmit, this.props.useSubmitBehavior]); } contentReadyEffect() { var { onContentReady } = this.props; onContentReady === null || onContentReady === void 0 ? void 0 : onContentReady({ element: this.contentRef.current.parentNode }); } submitEffect() { var namespace = "UIFeedback"; var { onSubmit, useSubmitBehavior } = this.props; if (useSubmitBehavior && onSubmit) { click.on(this.submitInputRef.current, event => onSubmit({ event, submitInput: this.submitInputRef.current }), { namespace }); return () => click.off(this.submitInputRef.current, { namespace }); } return undefined; } onActive(event) { var { useInkRipple } = this.props; useInkRipple && this.inkRippleRef.current.showWave({ element: this.contentRef.current, event }); } onInactive(event) { var { useInkRipple } = this.props; useInkRipple && this.inkRippleRef.current.hideWave({ element: this.contentRef.current, event }); } onWidgetClick(event) { var { onClick, useSubmitBehavior, validationGroup } = this.props; onClick === null || onClick === void 0 ? void 0 : onClick({ event, validationGroup }); useSubmitBehavior && this.submitInputRef.current.click(); } onWidgetKeyDown(options) { var { onKeyDown } = this.props; var { keyName, originalEvent, which } = options; var result = onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(options); if (result !== null && result !== void 0 && result.cancel) { return result; } if (keyName === "space" || which === "space" || keyName === "enter" || which === "enter") { originalEvent.preventDefault(); this.onWidgetClick(originalEvent); } return undefined; } get aria() { var { icon, text } = this.props; var label = text || icon; if (!text && icon && getImageSourceType(icon) === "image") { label = icon.indexOf("base64") === -1 ? icon.replace(/.+\/([^.]+)\..+$/, "$1") : "Base64"; } return _extends({ role: "button" }, label ? { label } : {}); } get cssClasses() { return getCssClasses(this.props); } get iconSource() { var { icon, type } = this.props; return icon || type === "back" ? icon || "back" : ""; } get inkRippleConfig() { var { icon, text, type } = this.props; return !text && icon || type === "back" ? { isCentered: true, useHoldAnimation: false, waveSizeCoefficient: 1 } : {}; } get restAttributes() { var _this$props = this.props, restProps = _objectWithoutPropertiesLoose(_this$props, _excluded); return restProps; } focus() { this.widgetRef.current.focus(); } render() { var props = this.props; return viewFunction({ props: _extends({}, props, { template: getTemplate(props.template) }), contentRef: this.contentRef, submitInputRef: this.submitInputRef, inkRippleRef: this.inkRippleRef, widgetRef: this.widgetRef, onActive: this.onActive, onInactive: this.onInactive, onWidgetClick: this.onWidgetClick, onWidgetKeyDown: this.onWidgetKeyDown, aria: this.aria, cssClasses: this.cssClasses, iconSource: this.iconSource, inkRippleConfig: this.inkRippleConfig, restAttributes: this.restAttributes }); } } function __createDefaultProps() { return _extends({}, ButtonProps, convertRulesToOptions(defaultOptionRules)); } Button.defaultProps = __createDefaultProps(); var __defaultOptionRules = []; export function defaultOptions(rule) { __defaultOptionRules.push(rule); Button.defaultProps = _extends({}, __createDefaultProps(), convertRulesToOptions(__defaultOptionRules)); }
const knex = require('knex'); const config = require('../knexfile.js'); const cache = require('../notificationsCache') // we must select the development object from our knexfile const db = knex(config.development); module.exports = async (project) => { try { const [id] = await db('projects').insert(project) const [newProject] = await db('projects') .select('*') .where({ id }) newProject.completed = Boolean(newProject.completed) cache.setProjects(newProject) return newProject } catch (e) { console.log(e) return e } }
Grailbird.data.tweets_2014_06 = [ { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "indices" : [ 28, 41 ], "id_str" : "2268581455", "id" : 2268581455 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "483585356248268800", "text" : "Hatching Grand Designs with @ZoeAppleseed", "id" : 483585356248268800, "created_at" : "2014-06-30 12:18:28 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "indices" : [ 3, 16 ], "id_str" : "2268581455", "id" : 2268581455 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/483146616161845248\/photo\/1", "indices" : [ 139, 140 ], "url" : "http:\/\/t.co\/ToIAgsRRW6", "media_url" : "http:\/\/pbs.twimg.com\/media\/BrR7SUJCEAAH9HB.jpg", "id_str" : "483146614609940480", "id" : 483146614609940480, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BrR7SUJCEAAH9HB.jpg", "sizes" : [ { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 610, "resize" : "fit", "w" : 500 }, { "h" : 610, "resize" : "fit", "w" : 500 }, { "h" : 610, "resize" : "fit", "w" : 500 }, { "h" : 414, "resize" : "fit", "w" : 340 } ], "display_url" : "pic.twitter.com\/ToIAgsRRW6" } ], "hashtags" : [ { "text" : "character", "indices" : [ 33, 43 ] }, { "text" : "design", "indices" : [ 44, 51 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "483155976820752384", "text" : "RT @ZoeAppleseed: Here's and old #character #design. I am much happier with the new photos of them for the website! more vibrant! http:\/\/t.\u2026", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/483146616161845248\/photo\/1", "indices" : [ 112, 134 ], "url" : "http:\/\/t.co\/ToIAgsRRW6", "media_url" : "http:\/\/pbs.twimg.com\/media\/BrR7SUJCEAAH9HB.jpg", "id_str" : "483146614609940480", "id" : 483146614609940480, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BrR7SUJCEAAH9HB.jpg", "sizes" : [ { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 610, "resize" : "fit", "w" : 500 }, { "h" : 610, "resize" : "fit", "w" : 500 }, { "h" : 610, "resize" : "fit", "w" : 500 }, { "h" : 414, "resize" : "fit", "w" : 340 } ], "display_url" : "pic.twitter.com\/ToIAgsRRW6" } ], "hashtags" : [ { "text" : "character", "indices" : [ 15, 25 ] }, { "text" : "design", "indices" : [ 26, 33 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "483146616161845248", "text" : "Here's and old #character #design. I am much happier with the new photos of them for the website! more vibrant! http:\/\/t.co\/ToIAgsRRW6", "id" : 483146616161845248, "created_at" : "2014-06-29 07:15:04 +0000", "user" : { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "protected" : false, "id_str" : "2268581455", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/577990416483545088\/mhOWEjUQ_normal.jpeg", "id" : 2268581455, "verified" : false } }, "id" : 483155976820752384, "created_at" : "2014-06-29 07:52:16 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ { "text" : "gamedev", "indices" : [ 39, 47 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "483155905173655552", "text" : "Oh how I despise Collision Detection \n\n#gamedev", "id" : 483155905173655552, "created_at" : "2014-06-29 07:51:59 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "483053272651931648", "text" : "I hobbled over the boxes and spiders to the other exit. And escaped. Super cautious not to be taken out by a Beatles hating psychopath.", "id" : 483053272651931648, "created_at" : "2014-06-29 01:04:09 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "483052749433479168", "text" : "I locked the door from the inside to stop the gust from blowing it open. Then I heard steps in the pitch black. And I couldn't get out.", "id" : 483052749433479168, "created_at" : "2014-06-29 01:02:04 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "483052377323212801", "text" : "Also, I jammed to Strawberry Fields Forever while the winter wind tried to destroy the backyard shed in which I was contained.", "id" : 483052377323212801, "created_at" : "2014-06-29 01:00:36 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "483052009600188416", "text" : "Yesterday I cleaned and restrung my old nylon guitar. She looks and sounds mighty pretty. I tried Corum Savarez strings. Solid.", "id" : 483052009600188416, "created_at" : "2014-06-29 00:59:08 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Henry Dawson", "screen_name" : "henry_dawson", "indices" : [ 3, 16 ], "id_str" : "21559225", "id" : 21559225 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "482129884622233600", "text" : "RT @henry_dawson: It's really hard explaining a pun to a kleptomaniac because they take things literally.", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/itunes.apple.com\/us\/app\/twitter\/id409789998?mt=12\" rel=\"nofollow\"\u003ETwitter for Mac\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "352944040641167362", "text" : "It's really hard explaining a pun to a kleptomaniac because they take things literally.", "id" : 352944040641167362, "created_at" : "2013-07-05 00:16:31 +0000", "user" : { "name" : "Henry Dawson", "screen_name" : "henry_dawson", "protected" : false, "id_str" : "21559225", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/249385916\/henry_normal.png", "id" : 21559225, "verified" : false } }, "id" : 482129884622233600, "created_at" : "2014-06-26 11:54:56 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "indices" : [ 0, 13 ], "id_str" : "2268581455", "id" : 2268581455 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/james_a_forbes\/status\/482128683058999297\/photo\/1", "indices" : [ 29, 51 ], "url" : "http:\/\/t.co\/dahjqI7way", "media_url" : "http:\/\/pbs.twimg.com\/media\/BrDde0KCQAEAwCV.png", "id_str" : "482128681595191297", "id" : 482128681595191297, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BrDde0KCQAEAwCV.png", "sizes" : [ { "h" : 59, "resize" : "crop", "w" : 150 }, { "h" : 59, "resize" : "fit", "w" : 238 }, { "h" : 59, "resize" : "fit", "w" : 238 }, { "h" : 59, "resize" : "fit", "w" : 238 }, { "h" : 59, "resize" : "fit", "w" : 238 } ], "display_url" : "pic.twitter.com\/dahjqI7way" } ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "482128683058999297", "in_reply_to_user_id" : 2268581455, "text" : "@ZoeAppleseed Happy Birthday http:\/\/t.co\/dahjqI7way", "id" : 482128683058999297, "created_at" : "2014-06-26 11:50:10 +0000", "in_reply_to_screen_name" : "ZoeAppleseed", "in_reply_to_user_id_str" : "2268581455", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "482124828669784064", "text" : "I've made Asteroids and Pacman. But still yet to make Snake and Tetris. Just feels like something every programmer needs to do.", "id" : 482124828669784064, "created_at" : "2014-06-26 11:34:51 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "DPHOTO", "screen_name" : "dphoto", "indices" : [ 30, 37 ], "id_str" : "41839280", "id" : 41839280 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "481961120618389504", "text" : "Really good to be back in the @dphoto codebase again. Lots of exciting features cooking!", "id" : 481961120618389504, "created_at" : "2014-06-26 00:44:20 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "YouTube", "screen_name" : "YouTube", "indices" : [ 16, 24 ], "id_str" : "10228272", "id" : 10228272 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "481253716696109056", "text" : "Wow, the ads on @youtube have reached an all time low!", "id" : 481253716696109056, "created_at" : "2014-06-24 01:53:21 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "indices" : [ 3, 16 ], "id_str" : "2268581455", "id" : 2268581455 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/481224136413310977\/photo\/1", "indices" : [ 61, 83 ], "url" : "http:\/\/t.co\/QiSu7366nR", "media_url" : "http:\/\/pbs.twimg.com\/media\/Bq2mzRPCQAAfyY7.jpg", "id_str" : "481224134928515072", "id" : 481224134928515072, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/Bq2mzRPCQAAfyY7.jpg", "sizes" : [ { "h" : 667, "resize" : "fit", "w" : 500 }, { "h" : 667, "resize" : "fit", "w" : 500 }, { "h" : 453, "resize" : "fit", "w" : 340 }, { "h" : 667, "resize" : "fit", "w" : 500 }, { "h" : 150, "resize" : "crop", "w" : 150 } ], "display_url" : "pic.twitter.com\/QiSu7366nR" } ], "hashtags" : [ { "text" : "magic", "indices" : [ 34, 40 ] }, { "text" : "illustration", "indices" : [ 41, 54 ] }, { "text" : "coat", "indices" : [ 55, 60 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "481234853182980096", "text" : "RT @ZoeAppleseed: The magic coat. #magic #illustration #coat http:\/\/t.co\/QiSu7366nR", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/481224136413310977\/photo\/1", "indices" : [ 43, 65 ], "url" : "http:\/\/t.co\/QiSu7366nR", "media_url" : "http:\/\/pbs.twimg.com\/media\/Bq2mzRPCQAAfyY7.jpg", "id_str" : "481224134928515072", "id" : 481224134928515072, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/Bq2mzRPCQAAfyY7.jpg", "sizes" : [ { "h" : 667, "resize" : "fit", "w" : 500 }, { "h" : 667, "resize" : "fit", "w" : 500 }, { "h" : 453, "resize" : "fit", "w" : 340 }, { "h" : 667, "resize" : "fit", "w" : 500 }, { "h" : 150, "resize" : "crop", "w" : 150 } ], "display_url" : "pic.twitter.com\/QiSu7366nR" } ], "hashtags" : [ { "text" : "magic", "indices" : [ 16, 22 ] }, { "text" : "illustration", "indices" : [ 23, 36 ] }, { "text" : "coat", "indices" : [ 37, 42 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "481224136413310977", "text" : "The magic coat. #magic #illustration #coat http:\/\/t.co\/QiSu7366nR", "id" : 481224136413310977, "created_at" : "2014-06-23 23:55:49 +0000", "user" : { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "protected" : false, "id_str" : "2268581455", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/577990416483545088\/mhOWEjUQ_normal.jpeg", "id" : 2268581455, "verified" : false } }, "id" : 481234853182980096, "created_at" : "2014-06-24 00:38:24 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "481217293238550531", "text" : "It's sleeting!", "id" : 481217293238550531, "created_at" : "2014-06-23 23:28:37 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "480701465791459328", "text" : "Inmate 1: Why do you draw numbers on the walls?\nInmate 2: For shivs and giggles.", "id" : 480701465791459328, "created_at" : "2014-06-22 13:18:55 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "indices" : [ 0, 13 ], "id_str" : "2268581455", "id" : 2268581455 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "480276037662539776", "in_reply_to_user_id" : 2268581455, "text" : "@ZoeAppleseed says that when you eat an olive pip you will get a kidney stone.", "id" : 480276037662539776, "created_at" : "2014-06-21 09:08:25 +0000", "in_reply_to_screen_name" : "ZoeAppleseed", "in_reply_to_user_id_str" : "2268581455", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "480121437479391234", "text" : "I resent that instagram photos don't render in the twitter feed. I can't respect a website that relies on tricks to attract page views.", "id" : 480121437479391234, "created_at" : "2014-06-20 22:54:05 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "James Robert Somers", "screen_name" : "jsomau", "indices" : [ 0, 7 ], "id_str" : "93714279", "id" : 93714279 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "479464053883289602", "geo" : { }, "id_str" : "479812113263644672", "in_reply_to_user_id" : 93714279, "text" : "@jsomau great to see you talking! Is this a regular deal?", "id" : 479812113263644672, "in_reply_to_status_id" : 479464053883289602, "created_at" : "2014-06-20 02:24:56 +0000", "in_reply_to_screen_name" : "jsomau", "in_reply_to_user_id_str" : "93714279", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "479570891278274560", "text" : "I'm working on a whiteboard app with infinite magnification. I'm yet to optimise, so pretty jolty right now.", "id" : 479570891278274560, "created_at" : "2014-06-19 10:26:25 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "479206984160268288", "text" : "I just wrote a pretty useful script in node for categorising income and expenses. Using it for tax time. My deductions are so close!", "id" : 479206984160268288, "created_at" : "2014-06-18 10:20:22 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "479125387574657027", "text" : "I just got two consecutive ads on YouTube. YouTube needs to die so badly.", "id" : 479125387574657027, "created_at" : "2014-06-18 04:56:08 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "479082262353297408", "text" : "I'm taking this loop off", "id" : 479082262353297408, "created_at" : "2014-06-18 02:04:46 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Ocean Leaves", "screen_name" : "oceanleavesband", "indices" : [ 0, 16 ], "id_str" : "206542186", "id" : 206542186 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ { "indices" : [ 19, 41 ], "url" : "http:\/\/t.co\/0wsqLeuPmV", "expanded_url" : "http:\/\/wavepot.com\/", "display_url" : "wavepot.com" } ] }, "geo" : { }, "id_str" : "479060037667549187", "in_reply_to_user_id" : 206542186, "text" : "@oceanleavesband \n\nhttp:\/\/t.co\/0wsqLeuPmV", "id" : 479060037667549187, "created_at" : "2014-06-18 00:36:28 +0000", "in_reply_to_screen_name" : "oceanleavesband", "in_reply_to_user_id_str" : "206542186", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "adam", "screen_name" : "ADAMATOMIC", "indices" : [ 0, 11 ], "id_str" : "70587360", "id" : 70587360 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "478965135663308800", "geo" : { }, "id_str" : "479055466702438400", "in_reply_to_user_id" : 70587360, "text" : "@ADAMATOMIC And, if you are more of a coder than an artist, you can get a lot of work done knowing that you can always wire it up later.", "id" : 479055466702438400, "in_reply_to_status_id" : 478965135663308800, "created_at" : "2014-06-18 00:18:18 +0000", "in_reply_to_screen_name" : "ADAMATOMIC", "in_reply_to_user_id_str" : "70587360", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "John Forbes", "screen_name" : "JohnRForbes", "indices" : [ 0, 12 ], "id_str" : "50233687", "id" : 50233687 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "478288206853459969", "geo" : { }, "id_str" : "478294541946982400", "in_reply_to_user_id" : 50233687, "text" : "@JohnRForbes Yes, but you already knew!", "id" : 478294541946982400, "in_reply_to_status_id" : 478288206853459969, "created_at" : "2014-06-15 21:54:39 +0000", "in_reply_to_screen_name" : "JohnRForbes", "in_reply_to_user_id_str" : "50233687", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/james_a_forbes\/status\/478166689419231232\/photo\/1", "indices" : [ 64, 86 ], "url" : "http:\/\/t.co\/S3R3TdSAeB", "media_url" : "http:\/\/pbs.twimg.com\/media\/BqLKEbjCUAEC2zw.png", "id_str" : "478166687917690881", "id" : 478166687917690881, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BqLKEbjCUAEC2zw.png", "sizes" : [ { "h" : 509, "resize" : "fit", "w" : 1201 }, { "h" : 254, "resize" : "fit", "w" : 600 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 144, "resize" : "fit", "w" : 340 }, { "h" : 433, "resize" : "fit", "w" : 1024 } ], "display_url" : "pic.twitter.com\/S3R3TdSAeB" } ], "hashtags" : [ { "text" : "gamedev", "indices" : [ 55, 63 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "478166689419231232", "text" : "I wonder if anyone can guess what this is a demake of? #gamedev http:\/\/t.co\/S3R3TdSAeB", "id" : 478166689419231232, "created_at" : "2014-06-15 13:26:37 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/james_a_forbes\/status\/478122537679720448\/photo\/1", "indices" : [ 48, 70 ], "url" : "http:\/\/t.co\/uo1Q0jVXcG", "media_url" : "http:\/\/pbs.twimg.com\/media\/BqKh6dhCYAAAch_.png", "id_str" : "478122536182374400", "id" : 478122536182374400, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BqKh6dhCYAAAch_.png", "sizes" : [ { "h" : 317, "resize" : "fit", "w" : 932 }, { "h" : 317, "resize" : "fit", "w" : 932 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 115, "resize" : "fit", "w" : 340 }, { "h" : 204, "resize" : "fit", "w" : 600 } ], "display_url" : "pic.twitter.com\/uo1Q0jVXcG" } ], "hashtags" : [ { "text" : "gamedev", "indices" : [ 39, 47 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "478122537679720448", "text" : "More progress on my nostalgia project. #gamedev http:\/\/t.co\/uo1Q0jVXcG", "id" : 478122537679720448, "created_at" : "2014-06-15 10:31:10 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Pickle Editor", "screen_name" : "PickleEditor", "indices" : [ 7, 20 ], "id_str" : "435978759", "id" : 435978759 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "478115049903362048", "text" : "I love @PickleEditor! Is there any chance of transparency being added in a later release? Very useful for lighting effects. :)", "id" : 478115049903362048, "created_at" : "2014-06-15 10:01:25 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Siena Somerset", "screen_name" : "doktorgoogle", "indices" : [ 0, 13 ], "id_str" : "486414259", "id" : 486414259 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "478070553773735936", "geo" : { }, "id_str" : "478103944577552384", "in_reply_to_user_id" : 486414259, "text" : "@doktorgoogle Thanks! They are wonderful!", "id" : 478103944577552384, "in_reply_to_status_id" : 478070553773735936, "created_at" : "2014-06-15 09:17:17 +0000", "in_reply_to_screen_name" : "doktorgoogle", "in_reply_to_user_id_str" : "486414259", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "indices" : [ 3, 16 ], "id_str" : "2268581455", "id" : 2268581455 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/478102534628728832\/photo\/1", "indices" : [ 93, 115 ], "url" : "http:\/\/t.co\/VHQzWbxtfL", "media_url" : "http:\/\/pbs.twimg.com\/media\/BqKPuH-CcAAsPdn.jpg", "id_str" : "478102533030703104", "id" : 478102533030703104, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BqKPuH-CcAAsPdn.jpg", "sizes" : [ { "h" : 727, "resize" : "fit", "w" : 500 }, { "h" : 727, "resize" : "fit", "w" : 500 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 727, "resize" : "fit", "w" : 500 }, { "h" : 494, "resize" : "fit", "w" : 340 } ], "display_url" : "pic.twitter.com\/VHQzWbxtfL" } ], "hashtags" : [ { "text" : "jesus", "indices" : [ 49, 55 ] }, { "text" : "ferrari", "indices" : [ 56, 64 ] }, { "text" : "art", "indices" : [ 65, 69 ] }, { "text" : "illustration", "indices" : [ 70, 83 ] }, { "text" : "drawing", "indices" : [ 84, 92 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "478103345173782528", "text" : "RT @ZoeAppleseed: New drawing from the other day #jesus #ferrari #art #illustration #drawing http:\/\/t.co\/VHQzWbxtfL", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/478102534628728832\/photo\/1", "indices" : [ 75, 97 ], "url" : "http:\/\/t.co\/VHQzWbxtfL", "media_url" : "http:\/\/pbs.twimg.com\/media\/BqKPuH-CcAAsPdn.jpg", "id_str" : "478102533030703104", "id" : 478102533030703104, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BqKPuH-CcAAsPdn.jpg", "sizes" : [ { "h" : 727, "resize" : "fit", "w" : 500 }, { "h" : 727, "resize" : "fit", "w" : 500 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 727, "resize" : "fit", "w" : 500 }, { "h" : 494, "resize" : "fit", "w" : 340 } ], "display_url" : "pic.twitter.com\/VHQzWbxtfL" } ], "hashtags" : [ { "text" : "jesus", "indices" : [ 31, 37 ] }, { "text" : "ferrari", "indices" : [ 38, 46 ] }, { "text" : "art", "indices" : [ 47, 51 ] }, { "text" : "illustration", "indices" : [ 52, 65 ] }, { "text" : "drawing", "indices" : [ 66, 74 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "478102534628728832", "text" : "New drawing from the other day #jesus #ferrari #art #illustration #drawing http:\/\/t.co\/VHQzWbxtfL", "id" : 478102534628728832, "created_at" : "2014-06-15 09:11:41 +0000", "user" : { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "protected" : false, "id_str" : "2268581455", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/577990416483545088\/mhOWEjUQ_normal.jpeg", "id" : 2268581455, "verified" : false } }, "id" : 478103345173782528, "created_at" : "2014-06-15 09:14:54 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Ocean Leaves", "screen_name" : "oceanleavesband", "indices" : [ 0, 16 ], "id_str" : "206542186", "id" : 206542186 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "478002370186473473", "geo" : { }, "id_str" : "478072741212352512", "in_reply_to_user_id" : 206542186, "text" : "@oceanleavesband Yes! Good to know.", "id" : 478072741212352512, "in_reply_to_status_id" : 478002370186473473, "created_at" : "2014-06-15 07:13:18 +0000", "in_reply_to_screen_name" : "oceanleavesband", "in_reply_to_user_id_str" : "206542186", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Siena Somerset", "screen_name" : "doktorgoogle", "indices" : [ 3, 16 ], "id_str" : "486414259", "id" : 486414259 }, { "name" : "James Forbes", "screen_name" : "james_a_forbes", "indices" : [ 18, 33 ], "id_str" : "16025792", "id" : 16025792 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ { "indices" : [ 99, 121 ], "url" : "http:\/\/t.co\/Xb7zK6yXHG", "expanded_url" : "http:\/\/www.reverbnation.com\/kristinafrazer", "display_url" : "reverbnation.com\/kristinafrazer" } ] }, "geo" : { }, "id_str" : "478072605526597632", "text" : "RT @doktorgoogle: @James_a_forbes - here's some easy listening smooth music from Kristina Frazer - http:\/\/t.co\/Xb7zK6yXHG", "retweeted_status" : { "source" : "\u003Ca href=\"https:\/\/dev.twitter.com\/docs\/tfw\" rel=\"nofollow\"\u003ETwitter for Websites\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "James Forbes", "screen_name" : "james_a_forbes", "indices" : [ 0, 15 ], "id_str" : "16025792", "id" : 16025792 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ { "indices" : [ 81, 103 ], "url" : "http:\/\/t.co\/Xb7zK6yXHG", "expanded_url" : "http:\/\/www.reverbnation.com\/kristinafrazer", "display_url" : "reverbnation.com\/kristinafrazer" } ] }, "geo" : { }, "id_str" : "478070553773735936", "in_reply_to_user_id" : 16025792, "text" : "@James_a_forbes - here's some easy listening smooth music from Kristina Frazer - http:\/\/t.co\/Xb7zK6yXHG", "id" : 478070553773735936, "created_at" : "2014-06-15 07:04:36 +0000", "in_reply_to_screen_name" : "james_a_forbes", "in_reply_to_user_id_str" : "16025792", "user" : { "name" : "Siena Somerset", "screen_name" : "doktorgoogle", "protected" : false, "id_str" : "486414259", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/524546925605842944\/hC2mg57N_normal.jpeg", "id" : 486414259, "verified" : false } }, "id" : 478072605526597632, "created_at" : "2014-06-15 07:12:45 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Ocean Leaves", "screen_name" : "oceanleavesband", "indices" : [ 0, 16 ], "id_str" : "206542186", "id" : 206542186 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "477999133458845696", "geo" : { }, "id_str" : "478002132180692992", "in_reply_to_user_id" : 206542186, "text" : "@oceanleavesband Oh and I thought it was clever how you are waiting around during the solo, just like the lyrics imply.", "id" : 478002132180692992, "in_reply_to_status_id" : 477999133458845696, "created_at" : "2014-06-15 02:32:43 +0000", "in_reply_to_screen_name" : "oceanleavesband", "in_reply_to_user_id_str" : "206542186", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Ocean Leaves", "screen_name" : "oceanleavesband", "indices" : [ 0, 16 ], "id_str" : "206542186", "id" : 206542186 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "477999133458845696", "geo" : { }, "id_str" : "478001962923749376", "in_reply_to_user_id" : 206542186, "text" : "@oceanleavesband Yeah that was great! Do your songs though man! Do a clip for Tonight or something.", "id" : 478001962923749376, "in_reply_to_status_id" : 477999133458845696, "created_at" : "2014-06-15 02:32:03 +0000", "in_reply_to_screen_name" : "oceanleavesband", "in_reply_to_user_id_str" : "206542186", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Ocean Leaves", "screen_name" : "oceanleavesband", "indices" : [ 0, 16 ], "id_str" : "206542186", "id" : 206542186 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "477984766415761408", "geo" : { }, "id_str" : "477990909498232832", "in_reply_to_user_id" : 206542186, "text" : "@oceanleavesband Dude!", "id" : 477990909498232832, "in_reply_to_status_id" : 477984766415761408, "created_at" : "2014-06-15 01:48:08 +0000", "in_reply_to_screen_name" : "oceanleavesband", "in_reply_to_user_id_str" : "206542186", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Ocean Leaves", "screen_name" : "oceanleavesband", "indices" : [ 3, 19 ], "id_str" : "206542186", "id" : 206542186 } ], "media" : [ ], "hashtags" : [ { "text" : "cover", "indices" : [ 60, 66 ] }, { "text" : "Beatles", "indices" : [ 67, 75 ] }, { "text" : "Harrison", "indices" : [ 76, 85 ] }, { "text" : "AbbeyRoad", "indices" : [ 86, 96 ] } ], "urls" : [ { "indices" : [ 37, 59 ], "url" : "http:\/\/t.co\/Jmvl2pY0kX", "expanded_url" : "http:\/\/youtu.be\/rTbRtltJcaY", "display_url" : "youtu.be\/rTbRtltJcaY" } ] }, "geo" : { }, "id_str" : "477990841454059520", "text" : "RT @oceanleavesband: I made a thing: http:\/\/t.co\/Jmvl2pY0kX #cover #Beatles #Harrison #AbbeyRoad", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ { "text" : "cover", "indices" : [ 39, 45 ] }, { "text" : "Beatles", "indices" : [ 46, 54 ] }, { "text" : "Harrison", "indices" : [ 55, 64 ] }, { "text" : "AbbeyRoad", "indices" : [ 65, 75 ] } ], "urls" : [ { "indices" : [ 16, 38 ], "url" : "http:\/\/t.co\/Jmvl2pY0kX", "expanded_url" : "http:\/\/youtu.be\/rTbRtltJcaY", "display_url" : "youtu.be\/rTbRtltJcaY" } ] }, "geo" : { }, "id_str" : "477984766415761408", "text" : "I made a thing: http:\/\/t.co\/Jmvl2pY0kX #cover #Beatles #Harrison #AbbeyRoad", "id" : 477984766415761408, "created_at" : "2014-06-15 01:23:43 +0000", "user" : { "name" : "Ocean Leaves", "screen_name" : "oceanleavesband", "protected" : false, "id_str" : "206542186", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/378800000293523567\/463652e04e0ec3da488dc98235541799_normal.jpeg", "id" : 206542186, "verified" : false } }, "id" : 477990841454059520, "created_at" : "2014-06-15 01:47:51 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Arne", "screen_name" : "AndroidArts", "indices" : [ 3, 15 ], "id_str" : "314201301", "id" : 314201301 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/AndroidArts\/status\/477706356632600578\/photo\/1", "indices" : [ 107, 129 ], "url" : "http:\/\/t.co\/2knWI80TV0", "media_url" : "http:\/\/pbs.twimg.com\/media\/BqEnZjLCQAABKmF.jpg", "id_str" : "477706355369721856", "id" : 477706355369721856, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BqEnZjLCQAABKmF.jpg", "sizes" : [ { "h" : 612, "resize" : "fit", "w" : 600 }, { "h" : 347, "resize" : "fit", "w" : 340 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 756, "resize" : "fit", "w" : 740 }, { "h" : 756, "resize" : "fit", "w" : 740 } ], "display_url" : "pic.twitter.com\/2knWI80TV0" } ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "477806921596928000", "text" : "RT @AndroidArts: More ink pen ships. Easy to fail and not be able to salvage the design with more lines :G http:\/\/t.co\/2knWI80TV0", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/AndroidArts\/status\/477706356632600578\/photo\/1", "indices" : [ 90, 112 ], "url" : "http:\/\/t.co\/2knWI80TV0", "media_url" : "http:\/\/pbs.twimg.com\/media\/BqEnZjLCQAABKmF.jpg", "id_str" : "477706355369721856", "id" : 477706355369721856, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BqEnZjLCQAABKmF.jpg", "sizes" : [ { "h" : 612, "resize" : "fit", "w" : 600 }, { "h" : 347, "resize" : "fit", "w" : 340 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 756, "resize" : "fit", "w" : 740 }, { "h" : 756, "resize" : "fit", "w" : 740 } ], "display_url" : "pic.twitter.com\/2knWI80TV0" } ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "477706356632600578", "text" : "More ink pen ships. Easy to fail and not be able to salvage the design with more lines :G http:\/\/t.co\/2knWI80TV0", "id" : 477706356632600578, "created_at" : "2014-06-14 06:57:25 +0000", "user" : { "name" : "Arne", "screen_name" : "AndroidArts", "protected" : false, "id_str" : "314201301", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/546826164094775296\/C45rmIBh_normal.jpeg", "id" : 314201301, "verified" : false } }, "id" : 477806921596928000, "created_at" : "2014-06-14 13:37:02 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/james_a_forbes\/status\/477806363678998528\/photo\/1", "indices" : [ 20, 42 ], "url" : "http:\/\/t.co\/NmRRk7uOpo", "media_url" : "http:\/\/pbs.twimg.com\/media\/BqGCWs_CYAAW7Ng.png", "id_str" : "477806362022273024", "id" : 477806362022273024, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BqGCWs_CYAAW7Ng.png", "sizes" : [ { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 629, "resize" : "fit", "w" : 948 }, { "h" : 398, "resize" : "fit", "w" : 600 }, { "h" : 629, "resize" : "fit", "w" : 948 }, { "h" : 225, "resize" : "fit", "w" : 340 } ], "display_url" : "pic.twitter.com\/NmRRk7uOpo" } ], "hashtags" : [ { "text" : "screenshotsaturday", "indices" : [ 0, 19 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "477806363678998528", "text" : "#screenshotsaturday http:\/\/t.co\/NmRRk7uOpo", "id" : 477806363678998528, "created_at" : "2014-06-14 13:34:48 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/james_a_forbes\/status\/477707981203595264\/photo\/1", "indices" : [ 111, 133 ], "url" : "http:\/\/t.co\/1Kh445i02o", "media_url" : "http:\/\/pbs.twimg.com\/media\/BqEo4F-CYAAqwbj.png", "id_str" : "477707979618148352", "id" : 477707979618148352, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BqEo4F-CYAAqwbj.png", "sizes" : [ { "h" : 250, "resize" : "fit", "w" : 340 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 442, "resize" : "fit", "w" : 600 }, { "h" : 600, "resize" : "fit", "w" : 814 }, { "h" : 600, "resize" : "fit", "w" : 814 } ], "display_url" : "pic.twitter.com\/1Kh445i02o" } ], "hashtags" : [ { "text" : "gamedev", "indices" : [ 96, 104 ] }, { "text" : "ld48", "indices" : [ 105, 110 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "477707981203595264", "text" : "Working on my Markdown like level format, downplay. It shall be released on Github imminently. #gamedev #ld48 http:\/\/t.co\/1Kh445i02o", "id" : 477707981203595264, "created_at" : "2014-06-14 07:03:52 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ { "text" : "ld48", "indices" : [ 57, 62 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "477692223249588224", "text" : "So happy with thejavascript spritesheet script I use for #ld48. I'll make a repo for it soon, it deserves it. So easy to use!", "id" : 477692223249588224, "created_at" : "2014-06-14 06:01:15 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Casey Muratori", "screen_name" : "cmuratori", "indices" : [ 0, 10 ], "id_str" : "26452299", "id" : 26452299 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "477278286779666433", "geo" : { }, "id_str" : "477373104579043328", "in_reply_to_user_id" : 26452299, "text" : "@cmuratori Can you elaborate specifically what you mean by vertical, and why HTTP is bad? I want to avoid wasting time w\/ shitty practices.", "id" : 477373104579043328, "in_reply_to_status_id" : 477278286779666433, "created_at" : "2014-06-13 08:53:11 +0000", "in_reply_to_screen_name" : "cmuratori", "in_reply_to_user_id_str" : "26452299", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Casey Muratori", "screen_name" : "cmuratori", "indices" : [ 0, 10 ], "id_str" : "26452299", "id" : 26452299 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "477258820012367873", "in_reply_to_user_id" : 26452299, "text" : "@cmuratori REST maps well to OOP code. Do you have a suggestion for how to write HTTP API's that map well to compression oriented code?", "id" : 477258820012367873, "created_at" : "2014-06-13 01:19:04 +0000", "in_reply_to_screen_name" : "cmuratori", "in_reply_to_user_id_str" : "26452299", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "477242331314155520", "text" : "Really into drinking boiled water lately.", "id" : 477242331314155520, "created_at" : "2014-06-13 00:13:33 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "NYCLU", "screen_name" : "NYCLU", "indices" : [ 3, 9 ], "id_str" : "23833641", "id" : 23833641 }, { "name" : "ACLU National", "screen_name" : "ACLU", "indices" : [ 30, 35 ], "id_str" : "13393052", "id" : 13393052 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/NYCLU\/status\/477162606915231744\/photo\/1", "indices" : [ 139, 140 ], "url" : "http:\/\/t.co\/FBtQBYQY7b", "media_url" : "http:\/\/pbs.twimg.com\/media\/Bp843KKCIAAK5ru.jpg", "id_str" : "477162605794959360", "id" : 477162605794959360, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/Bp843KKCIAAK5ru.jpg", "sizes" : [ { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 227, "resize" : "fit", "w" : 340 }, { "h" : 434, "resize" : "fit", "w" : 648 }, { "h" : 401, "resize" : "fit", "w" : 600 }, { "h" : 434, "resize" : "fit", "w" : 648 } ], "display_url" : "pic.twitter.com\/FBtQBYQY7b" } ], "hashtags" : [ { "text" : "LovingDay", "indices" : [ 118, 128 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "477217397514833920", "text" : "RT @NYCLU: TODAY in 1967, the @ACLU successfully argued that state bans on interracial marriage are unconstitutional. #LovingDay http:\/\/t.c\u2026", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "ACLU National", "screen_name" : "ACLU", "indices" : [ 19, 24 ], "id_str" : "13393052", "id" : 13393052 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/NYCLU\/status\/477162606915231744\/photo\/1", "indices" : [ 118, 140 ], "url" : "http:\/\/t.co\/FBtQBYQY7b", "media_url" : "http:\/\/pbs.twimg.com\/media\/Bp843KKCIAAK5ru.jpg", "id_str" : "477162605794959360", "id" : 477162605794959360, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/Bp843KKCIAAK5ru.jpg", "sizes" : [ { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 227, "resize" : "fit", "w" : 340 }, { "h" : 434, "resize" : "fit", "w" : 648 }, { "h" : 401, "resize" : "fit", "w" : 600 }, { "h" : 434, "resize" : "fit", "w" : 648 } ], "display_url" : "pic.twitter.com\/FBtQBYQY7b" } ], "hashtags" : [ { "text" : "LovingDay", "indices" : [ 107, 117 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "477162606915231744", "text" : "TODAY in 1967, the @ACLU successfully argued that state bans on interracial marriage are unconstitutional. #LovingDay http:\/\/t.co\/FBtQBYQY7b", "id" : 477162606915231744, "created_at" : "2014-06-12 18:56:45 +0000", "user" : { "name" : "NYCLU", "screen_name" : "NYCLU", "protected" : false, "id_str" : "23833641", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/542790725914476544\/5vLyoWb0_normal.jpeg", "id" : 23833641, "verified" : false } }, "id" : 477217397514833920, "created_at" : "2014-06-12 22:34:28 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Tim Schafer", "screen_name" : "TimOfLegend", "indices" : [ 3, 15 ], "id_str" : "24585498", "id" : 24585498 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "477045654158467073", "text" : "RT @TimOfLegend: You know it means a lot to me because I'm using hashtags. You know how much that hurts. Imagine you grandpa breakdancing. \u2026", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\/download\/iphone\" rel=\"nofollow\"\u003ETwitter for iPhone\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "476779369168265216", "text" : "You know it means a lot to me because I'm using hashtags. You know how much that hurts. Imagine you grandpa breakdancing. That's how much.", "id" : 476779369168265216, "created_at" : "2014-06-11 17:33:54 +0000", "user" : { "name" : "Tim Schafer", "screen_name" : "TimOfLegend", "protected" : false, "id_str" : "24585498", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/543564604190646272\/9OIp8HvK_normal.jpeg", "id" : 24585498, "verified" : true } }, "id" : 477045654158467073, "created_at" : "2014-06-12 11:12:01 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Joonas Linkola", "screen_name" : "joonaslinkola", "indices" : [ 3, 17 ], "id_str" : "20624036", "id" : 20624036 }, { "name" : "2 Player Productions", "screen_name" : "2PProductions", "indices" : [ 52, 66 ], "id_str" : "46179487", "id" : 46179487 }, { "name" : "Tim Schafer", "screen_name" : "TimOfLegend", "indices" : [ 119, 131 ], "id_str" : "24585498", "id" : 24585498 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/joonaslinkola\/status\/476434427439247362\/photo\/1", "indices" : [ 139, 140 ], "url" : "http:\/\/t.co\/potpuqW3u2", "media_url" : "http:\/\/pbs.twimg.com\/media\/BpyilleIcAAdhnh.png", "id_str" : "476434427191783424", "id" : 476434427191783424, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BpyilleIcAAdhnh.png", "sizes" : [ { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 420, "resize" : "fit", "w" : 514 }, { "h" : 277, "resize" : "fit", "w" : 340 }, { "h" : 420, "resize" : "fit", "w" : 514 }, { "h" : 420, "resize" : "fit", "w" : 514 } ], "display_url" : "pic.twitter.com\/potpuqW3u2" } ], "hashtags" : [ ], "urls" : [ { "indices" : [ 68, 91 ], "url" : "https:\/\/t.co\/7fpfbesEkl", "expanded_url" : "https:\/\/www.youtube.com\/watch?v=JNhE7zxJymE", "display_url" : "youtube.com\/watch?v=JNhE7z\u2026" } ] }, "geo" : { }, "id_str" : "476706439033913344", "text" : "RT @joonaslinkola: Grim Fandango retrospective from @2PProductions: https:\/\/t.co\/7fpfbesEkl Featuring younger, curlier @TimOfLegend! http:\/\u2026", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/itunes.apple.com\/us\/app\/twitter\/id409789998?mt=12\" rel=\"nofollow\"\u003ETwitter for Mac\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "2 Player Productions", "screen_name" : "2PProductions", "indices" : [ 33, 47 ], "id_str" : "46179487", "id" : 46179487 }, { "name" : "Tim Schafer", "screen_name" : "TimOfLegend", "indices" : [ 100, 112 ], "id_str" : "24585498", "id" : 24585498 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/joonaslinkola\/status\/476434427439247362\/photo\/1", "indices" : [ 114, 136 ], "url" : "http:\/\/t.co\/potpuqW3u2", "media_url" : "http:\/\/pbs.twimg.com\/media\/BpyilleIcAAdhnh.png", "id_str" : "476434427191783424", "id" : 476434427191783424, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BpyilleIcAAdhnh.png", "sizes" : [ { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 420, "resize" : "fit", "w" : 514 }, { "h" : 277, "resize" : "fit", "w" : 340 }, { "h" : 420, "resize" : "fit", "w" : 514 }, { "h" : 420, "resize" : "fit", "w" : 514 } ], "display_url" : "pic.twitter.com\/potpuqW3u2" } ], "hashtags" : [ ], "urls" : [ { "indices" : [ 49, 72 ], "url" : "https:\/\/t.co\/7fpfbesEkl", "expanded_url" : "https:\/\/www.youtube.com\/watch?v=JNhE7zxJymE", "display_url" : "youtube.com\/watch?v=JNhE7z\u2026" } ] }, "geo" : { }, "id_str" : "476434427439247362", "text" : "Grim Fandango retrospective from @2PProductions: https:\/\/t.co\/7fpfbesEkl Featuring younger, curlier @TimOfLegend! http:\/\/t.co\/potpuqW3u2", "id" : 476434427439247362, "created_at" : "2014-06-10 18:43:13 +0000", "user" : { "name" : "Joonas Linkola", "screen_name" : "joonaslinkola", "protected" : false, "id_str" : "20624036", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/570664156156526592\/IbBcQen0_normal.jpeg", "id" : 20624036, "verified" : false } }, "id" : 476706439033913344, "created_at" : "2014-06-11 12:44:06 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "indices" : [ 3, 16 ], "id_str" : "2268581455", "id" : 2268581455 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/476528771063754753\/photo\/1", "indices" : [ 82, 104 ], "url" : "http:\/\/t.co\/JeIFZgOZOR", "media_url" : "http:\/\/pbs.twimg.com\/media\/Bpz4Y4-CMAAzUqA.jpg", "id_str" : "476528767087554560", "id" : 476528767087554560, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/Bpz4Y4-CMAAzUqA.jpg", "sizes" : [ { "h" : 453, "resize" : "fit", "w" : 340 }, { "h" : 533, "resize" : "fit", "w" : 400 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 533, "resize" : "fit", "w" : 400 }, { "h" : 533, "resize" : "fit", "w" : 400 } ], "display_url" : "pic.twitter.com\/JeIFZgOZOR" } ], "hashtags" : [ { "text" : "rose", "indices" : [ 54, 59 ] }, { "text" : "grumpy", "indices" : [ 60, 67 ] }, { "text" : "illustration", "indices" : [ 68, 81 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "476700701381242881", "text" : "RT @ZoeAppleseed: A grumpy rose for you today twitter #rose #grumpy #illustration http:\/\/t.co\/JeIFZgOZOR", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/476528771063754753\/photo\/1", "indices" : [ 64, 86 ], "url" : "http:\/\/t.co\/JeIFZgOZOR", "media_url" : "http:\/\/pbs.twimg.com\/media\/Bpz4Y4-CMAAzUqA.jpg", "id_str" : "476528767087554560", "id" : 476528767087554560, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/Bpz4Y4-CMAAzUqA.jpg", "sizes" : [ { "h" : 453, "resize" : "fit", "w" : 340 }, { "h" : 533, "resize" : "fit", "w" : 400 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 533, "resize" : "fit", "w" : 400 }, { "h" : 533, "resize" : "fit", "w" : 400 } ], "display_url" : "pic.twitter.com\/JeIFZgOZOR" } ], "hashtags" : [ { "text" : "rose", "indices" : [ 36, 41 ] }, { "text" : "grumpy", "indices" : [ 42, 49 ] }, { "text" : "illustration", "indices" : [ 50, 63 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "476528771063754753", "text" : "A grumpy rose for you today twitter #rose #grumpy #illustration http:\/\/t.co\/JeIFZgOZOR", "id" : 476528771063754753, "created_at" : "2014-06-11 00:58:07 +0000", "user" : { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "protected" : false, "id_str" : "2268581455", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/577990416483545088\/mhOWEjUQ_normal.jpeg", "id" : 2268581455, "verified" : false } }, "id" : 476700701381242881, "created_at" : "2014-06-11 12:21:18 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/james_a_forbes\/status\/476536492404129792\/photo\/1", "indices" : [ 39, 61 ], "url" : "http:\/\/t.co\/Op7D5sU6aE", "media_url" : "http:\/\/pbs.twimg.com\/media\/Bpz_aeUCEAEQMeE.png", "id_str" : "476536490873196545", "id" : 476536490873196545, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/Bpz_aeUCEAEQMeE.png", "sizes" : [ { "h" : 46, "resize" : "fit", "w" : 215 }, { "h" : 46, "resize" : "fit", "w" : 215 }, { "h" : 46, "resize" : "crop", "w" : 150 }, { "h" : 46, "resize" : "fit", "w" : 215 }, { "h" : 46, "resize" : "fit", "w" : 215 } ], "display_url" : "pic.twitter.com\/Op7D5sU6aE" } ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "476536492404129792", "text" : "Close call, nearly had to install Java http:\/\/t.co\/Op7D5sU6aE", "id" : 476536492404129792, "created_at" : "2014-06-11 01:28:48 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "476359740109234178", "text" : "At the treacherous intersection of choice and chance. Threes remains interesting, deep, surprising and rich. Astonished.", "id" : 476359740109234178, "created_at" : "2014-06-10 13:46:27 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "476192173646286848", "text" : "Windows Phone 8.1 tip:\rSelect a word, tap shift to cycle between Title, Upper and Lowercase format.", "id" : 476192173646286848, "created_at" : "2014-06-10 02:40:36 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "476176727975022593", "text" : "Tried to send a text in Japanese, but it would not send. I thought there was some kind of conspiracy afoot. Turns out I was out of credit.", "id" : 476176727975022593, "created_at" : "2014-06-10 01:39:13 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Gorogoa", "screen_name" : "Gorogoa", "indices" : [ 3, 11 ], "id_str" : "768965604", "id" : 768965604 }, { "name" : "Austin Wintory", "screen_name" : "awintory", "indices" : [ 38, 47 ], "id_str" : "29634406", "id" : 29634406 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ { "indices" : [ 120, 140 ], "url" : "https:\/\/t.co\/kx12kYR7JE", "expanded_url" : "https:\/\/www.youtube.com\/watch?v=jqvraGNfKVY", "display_url" : "youtube.com\/watch?v=jqvraG\u2026" } ] }, "geo" : { }, "id_str" : "476166829681819649", "text" : "RT @Gorogoa: Sympathy and support for @awintory. If you are concerned about the future of music in games, please watch: https:\/\/t.co\/kx12kY\u2026", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Austin Wintory", "screen_name" : "awintory", "indices" : [ 25, 34 ], "id_str" : "29634406", "id" : 29634406 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ { "indices" : [ 107, 130 ], "url" : "https:\/\/t.co\/kx12kYR7JE", "expanded_url" : "https:\/\/www.youtube.com\/watch?v=jqvraGNfKVY", "display_url" : "youtube.com\/watch?v=jqvraG\u2026" } ] }, "geo" : { }, "id_str" : "476162805830139904", "text" : "Sympathy and support for @awintory. If you are concerned about the future of music in games, please watch: https:\/\/t.co\/kx12kYR7JE", "id" : 476162805830139904, "created_at" : "2014-06-10 00:43:54 +0000", "user" : { "name" : "Gorogoa", "screen_name" : "Gorogoa", "protected" : false, "id_str" : "768965604", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/2539960515\/i3ces20geea1p9ozj5np_normal.jpeg", "id" : 768965604, "verified" : false } }, "id" : 476166829681819649, "created_at" : "2014-06-10 00:59:53 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "475921628669292545", "text" : "Just played threes finally, what a beautiful game. Now eating homemade ice cream and watching game of thrones", "id" : 475921628669292545, "created_at" : "2014-06-09 08:45:33 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "indices" : [ 3, 16 ], "id_str" : "2268581455", "id" : 2268581455 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/475830539199320064\/photo\/1", "indices" : [ 44, 66 ], "url" : "http:\/\/t.co\/GC307kYvIT", "media_url" : "http:\/\/pbs.twimg.com\/media\/Bpp9WluCIAA4nQs.jpg", "id_str" : "475830537676791808", "id" : 475830537676791808, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/Bpp9WluCIAA4nQs.jpg", "sizes" : [ { "h" : 550, "resize" : "fit", "w" : 400 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 550, "resize" : "fit", "w" : 400 }, { "h" : 550, "resize" : "fit", "w" : 400 }, { "h" : 467, "resize" : "fit", "w" : 340 } ], "display_url" : "pic.twitter.com\/GC307kYvIT" } ], "hashtags" : [ { "text" : "illustration", "indices" : [ 25, 38 ] }, { "text" : "art", "indices" : [ 39, 43 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "475864898056884224", "text" : "RT @ZoeAppleseed: dancer #illustration #art http:\/\/t.co\/GC307kYvIT", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/475830539199320064\/photo\/1", "indices" : [ 26, 48 ], "url" : "http:\/\/t.co\/GC307kYvIT", "media_url" : "http:\/\/pbs.twimg.com\/media\/Bpp9WluCIAA4nQs.jpg", "id_str" : "475830537676791808", "id" : 475830537676791808, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/Bpp9WluCIAA4nQs.jpg", "sizes" : [ { "h" : 550, "resize" : "fit", "w" : 400 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 550, "resize" : "fit", "w" : 400 }, { "h" : 550, "resize" : "fit", "w" : 400 }, { "h" : 467, "resize" : "fit", "w" : 340 } ], "display_url" : "pic.twitter.com\/GC307kYvIT" } ], "hashtags" : [ { "text" : "illustration", "indices" : [ 7, 20 ] }, { "text" : "art", "indices" : [ 21, 25 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "475830539199320064", "text" : "dancer #illustration #art http:\/\/t.co\/GC307kYvIT", "id" : 475830539199320064, "created_at" : "2014-06-09 02:43:35 +0000", "user" : { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "protected" : false, "id_str" : "2268581455", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/577990416483545088\/mhOWEjUQ_normal.jpeg", "id" : 2268581455, "verified" : false } }, "id" : 475864898056884224, "created_at" : "2014-06-09 05:00:07 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "James Paulin", "screen_name" : "jimmypaulin", "indices" : [ 0, 12 ], "id_str" : "35014165", "id" : 35014165 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "475721208571650050", "geo" : { }, "id_str" : "475727761282060288", "in_reply_to_user_id" : 35014165, "text" : "@jimmypaulin I think time lapsing is the one thing that keeps me on the ball. Also, work on the most interesting parts first.", "id" : 475727761282060288, "in_reply_to_status_id" : 475721208571650050, "created_at" : "2014-06-08 19:55:11 +0000", "in_reply_to_screen_name" : "jimmypaulin", "in_reply_to_user_id_str" : "35014165", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "475571492613136384", "text" : "Playing Zelda A Link to the Past on my phone. The future has arrived.", "id" : 475571492613136384, "created_at" : "2014-06-08 09:34:14 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "475528392763117569", "text" : "Why is twitter dead today?", "id" : 475528392763117569, "created_at" : "2014-06-08 06:42:58 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "James Robert Somers", "screen_name" : "jsomau", "indices" : [ 0, 7 ], "id_str" : "93714279", "id" : 93714279 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "473645666691186691", "geo" : { }, "id_str" : "475447884247097344", "in_reply_to_user_id" : 93714279, "text" : "@jsomau yeah no luck man. It was like 25 on release, but they were upgrade prices. Sorry", "id" : 475447884247097344, "in_reply_to_status_id" : 473645666691186691, "created_at" : "2014-06-08 01:23:03 +0000", "in_reply_to_screen_name" : "jsomau", "in_reply_to_user_id_str" : "93714279", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Siena Somerset", "screen_name" : "doktorgoogle", "indices" : [ 0, 13 ], "id_str" : "486414259", "id" : 486414259 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "474889230364057600", "geo" : { }, "id_str" : "475447658211848194", "in_reply_to_user_id" : 486414259, "text" : "@doktorgoogle I wish I could see his talk!", "id" : 475447658211848194, "in_reply_to_status_id" : 474889230364057600, "created_at" : "2014-06-08 01:22:09 +0000", "in_reply_to_screen_name" : "doktorgoogle", "in_reply_to_user_id_str" : "486414259", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Patrick", "screen_name" : "Vectorpark", "indices" : [ 0, 11 ], "id_str" : "35604279", "id" : 35604279 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "475174343450689536", "geo" : { }, "id_str" : "475190689647452161", "in_reply_to_user_id" : 35604279, "text" : "@Vectorpark what is the mystery?", "id" : 475190689647452161, "in_reply_to_status_id" : 475174343450689536, "created_at" : "2014-06-07 08:21:03 +0000", "in_reply_to_screen_name" : "Vectorpark", "in_reply_to_user_id_str" : "35604279", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "The Intercept", "screen_name" : "the_intercept", "indices" : [ 3, 17 ], "id_str" : "2329066872", "id" : 2329066872 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/the_intercept\/status\/474312531063087105\/photo\/1", "indices" : [ 117, 139 ], "url" : "http:\/\/t.co\/Aho1ogBroJ", "media_url" : "http:\/\/pbs.twimg.com\/media\/BpUYu7ICMAAklZf.png", "id_str" : "474312530181894144", "id" : 474312530181894144, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BpUYu7ICMAAklZf.png", "sizes" : [ { "h" : 413, "resize" : "fit", "w" : 600 }, { "h" : 592, "resize" : "fit", "w" : 860 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 234, "resize" : "fit", "w" : 340 }, { "h" : 592, "resize" : "fit", "w" : 859 } ], "display_url" : "pic.twitter.com\/Aho1ogBroJ" } ], "hashtags" : [ { "text" : "resetthenet", "indices" : [ 36, 48 ] } ], "urls" : [ { "indices" : [ 94, 116 ], "url" : "http:\/\/t.co\/c38GFtT3J5", "expanded_url" : "http:\/\/resetthenet.tumblr.com\/post\/87793640365\/edward-snowdens-statement-in-support-of-reset-the-net", "display_url" : "resetthenet.tumblr.com\/post\/877936403\u2026" } ] }, "geo" : { }, "id_str" : "474340308335865857", "text" : "RT @the_intercept: Snowden endorses #resetthenet: \u201CDon\u2019t ask for your privacy. Take it back.\u201D http:\/\/t.co\/c38GFtT3J5 http:\/\/t.co\/Aho1ogBroJ", "retweeted_status" : { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/the_intercept\/status\/474312531063087105\/photo\/1", "indices" : [ 98, 120 ], "url" : "http:\/\/t.co\/Aho1ogBroJ", "media_url" : "http:\/\/pbs.twimg.com\/media\/BpUYu7ICMAAklZf.png", "id_str" : "474312530181894144", "id" : 474312530181894144, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BpUYu7ICMAAklZf.png", "sizes" : [ { "h" : 413, "resize" : "fit", "w" : 600 }, { "h" : 592, "resize" : "fit", "w" : 860 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 234, "resize" : "fit", "w" : 340 }, { "h" : 592, "resize" : "fit", "w" : 859 } ], "display_url" : "pic.twitter.com\/Aho1ogBroJ" } ], "hashtags" : [ { "text" : "resetthenet", "indices" : [ 17, 29 ] } ], "urls" : [ { "indices" : [ 75, 97 ], "url" : "http:\/\/t.co\/c38GFtT3J5", "expanded_url" : "http:\/\/resetthenet.tumblr.com\/post\/87793640365\/edward-snowdens-statement-in-support-of-reset-the-net", "display_url" : "resetthenet.tumblr.com\/post\/877936403\u2026" } ] }, "geo" : { }, "id_str" : "474312531063087105", "text" : "Snowden endorses #resetthenet: \u201CDon\u2019t ask for your privacy. Take it back.\u201D http:\/\/t.co\/c38GFtT3J5 http:\/\/t.co\/Aho1ogBroJ", "id" : 474312531063087105, "created_at" : "2014-06-04 22:11:34 +0000", "user" : { "name" : "The Intercept", "screen_name" : "the_intercept", "protected" : false, "id_str" : "2329066872", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/434528505456390144\/IoCA3JMs_normal.png", "id" : 2329066872, "verified" : true } }, "id" : 474340308335865857, "created_at" : "2014-06-05 00:01:56 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ { "text" : "gamedev", "indices" : [ 130, 138 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "474340046967816192", "text" : "T9 and Swype are genius approaches to tame new interfaces.\rThe same open minded approach could be readily applied to game design. #gamedev", "id" : 474340046967816192, "created_at" : "2014-06-05 00:00:54 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "indices" : [ 3, 16 ], "id_str" : "2268581455", "id" : 2268581455 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/474112984524922881\/photo\/1", "indices" : [ 68, 90 ], "url" : "http:\/\/t.co\/pgq6T4B3uB", "media_url" : "http:\/\/pbs.twimg.com\/media\/BpRjPlDCIAAyK6M.jpg", "id_str" : "474112980074766336", "id" : 474112980074766336, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BpRjPlDCIAAyK6M.jpg", "sizes" : [ { "h" : 351, "resize" : "fit", "w" : 340 }, { "h" : 414, "resize" : "fit", "w" : 400 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 414, "resize" : "fit", "w" : 400 }, { "h" : 414, "resize" : "fit", "w" : 400 } ], "display_url" : "pic.twitter.com\/pgq6T4B3uB" } ], "hashtags" : [ { "text" : "illustration", "indices" : [ 49, 62 ] }, { "text" : "art", "indices" : [ 63, 67 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "474135813777653760", "text" : "RT @ZoeAppleseed: Boy and brain. One i did today #illustration #art http:\/\/t.co\/pgq6T4B3uB", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/474112984524922881\/photo\/1", "indices" : [ 50, 72 ], "url" : "http:\/\/t.co\/pgq6T4B3uB", "media_url" : "http:\/\/pbs.twimg.com\/media\/BpRjPlDCIAAyK6M.jpg", "id_str" : "474112980074766336", "id" : 474112980074766336, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BpRjPlDCIAAyK6M.jpg", "sizes" : [ { "h" : 351, "resize" : "fit", "w" : 340 }, { "h" : 414, "resize" : "fit", "w" : 400 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 414, "resize" : "fit", "w" : 400 }, { "h" : 414, "resize" : "fit", "w" : 400 } ], "display_url" : "pic.twitter.com\/pgq6T4B3uB" } ], "hashtags" : [ { "text" : "illustration", "indices" : [ 31, 44 ] }, { "text" : "art", "indices" : [ 45, 49 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "474112984524922881", "text" : "Boy and brain. One i did today #illustration #art http:\/\/t.co\/pgq6T4B3uB", "id" : 474112984524922881, "created_at" : "2014-06-04 08:58:38 +0000", "user" : { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "protected" : false, "id_str" : "2268581455", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/577990416483545088\/mhOWEjUQ_normal.jpeg", "id" : 2268581455, "verified" : false } }, "id" : 474135813777653760, "created_at" : "2014-06-04 10:29:21 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "indices" : [ 0, 13 ], "id_str" : "2268581455", "id" : 2268581455 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ { "indices" : [ 76, 98 ], "url" : "http:\/\/t.co\/wOv5MjhrhH", "expanded_url" : "http:\/\/vimeo.com\/user12876308", "display_url" : "vimeo.com\/user12876308" } ] }, "geo" : { }, "id_str" : "474133822645096448", "in_reply_to_user_id" : 2268581455, "text" : "@ZoeAppleseed Here is that amazing animator we were watching Hoji Tsuchiya \nhttp:\/\/t.co\/wOv5MjhrhH", "id" : 474133822645096448, "created_at" : "2014-06-04 10:21:26 +0000", "in_reply_to_screen_name" : "ZoeAppleseed", "in_reply_to_user_id_str" : "2268581455", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Sachka Sandra Duval", "screen_name" : "RadioSachka", "indices" : [ 3, 15 ], "id_str" : "103894420", "id" : 103894420 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/RadioSachka\/status\/473931965528551424\/photo\/1", "indices" : [ 88, 110 ], "url" : "http:\/\/t.co\/eghTZiyfBg", "media_url" : "http:\/\/pbs.twimg.com\/media\/BpO-nBPIUAATBHv.jpg", "id_str" : "473931963360104448", "id" : 473931963360104448, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BpO-nBPIUAATBHv.jpg", "sizes" : [ { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 599, "resize" : "fit", "w" : 1024 }, { "h" : 1035, "resize" : "fit", "w" : 1767 }, { "h" : 199, "resize" : "fit", "w" : 340 }, { "h" : 351, "resize" : "fit", "w" : 600 } ], "display_url" : "pic.twitter.com\/eghTZiyfBg" } ], "hashtags" : [ ], "urls" : [ { "indices" : [ 64, 87 ], "url" : "https:\/\/t.co\/FtaPw6Bwwq", "expanded_url" : "https:\/\/ideas.lego.com\/blogs\/1-blog\/post\/11", "display_url" : "ideas.lego.com\/blogs\/1-blog\/p\u2026" } ] }, "geo" : { }, "id_str" : "473970462297313281", "text" : "RT @RadioSachka: Lego to release a female scientist miniset \\o\/ https:\/\/t.co\/FtaPw6Bwwq http:\/\/t.co\/eghTZiyfBg", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/RadioSachka\/status\/473931965528551424\/photo\/1", "indices" : [ 71, 93 ], "url" : "http:\/\/t.co\/eghTZiyfBg", "media_url" : "http:\/\/pbs.twimg.com\/media\/BpO-nBPIUAATBHv.jpg", "id_str" : "473931963360104448", "id" : 473931963360104448, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BpO-nBPIUAATBHv.jpg", "sizes" : [ { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 599, "resize" : "fit", "w" : 1024 }, { "h" : 1035, "resize" : "fit", "w" : 1767 }, { "h" : 199, "resize" : "fit", "w" : 340 }, { "h" : 351, "resize" : "fit", "w" : 600 } ], "display_url" : "pic.twitter.com\/eghTZiyfBg" } ], "hashtags" : [ ], "urls" : [ { "indices" : [ 47, 70 ], "url" : "https:\/\/t.co\/FtaPw6Bwwq", "expanded_url" : "https:\/\/ideas.lego.com\/blogs\/1-blog\/post\/11", "display_url" : "ideas.lego.com\/blogs\/1-blog\/p\u2026" } ] }, "geo" : { }, "id_str" : "473931965528551424", "text" : "Lego to release a female scientist miniset \\o\/ https:\/\/t.co\/FtaPw6Bwwq http:\/\/t.co\/eghTZiyfBg", "id" : 473931965528551424, "created_at" : "2014-06-03 20:59:20 +0000", "user" : { "name" : "Sachka Sandra Duval", "screen_name" : "RadioSachka", "protected" : false, "id_str" : "103894420", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/522144327447752705\/VlMCGzvl_normal.jpeg", "id" : 103894420, "verified" : false } }, "id" : 473970462297313281, "created_at" : "2014-06-03 23:32:18 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "James Robert Somers", "screen_name" : "jsomau", "indices" : [ 0, 7 ], "id_str" : "93714279", "id" : 93714279 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "473601738659102720", "geo" : { }, "id_str" : "473624378047873024", "in_reply_to_user_id" : 93714279, "text" : "@jsomau Weird, I thought it was like $25.", "id" : 473624378047873024, "in_reply_to_status_id" : 473601738659102720, "created_at" : "2014-06-03 00:37:05 +0000", "in_reply_to_screen_name" : "jsomau", "in_reply_to_user_id_str" : "93714279", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Jonathan Blow", "screen_name" : "Jonathan_Blow", "indices" : [ 0, 14 ], "id_str" : "107336879", "id" : 107336879 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/james_a_forbes\/status\/473623276657184768\/photo\/1", "indices" : [ 15, 37 ], "url" : "http:\/\/t.co\/vaIlmI1aZg", "media_url" : "http:\/\/pbs.twimg.com\/media\/BpKl3FHCMAAGWsi.jpg", "id_str" : "473623276510392320", "id" : 473623276510392320, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BpKl3FHCMAAGWsi.jpg", "sizes" : [ { "h" : 999, "resize" : "fit", "w" : 600 }, { "h" : 1024, "resize" : "fit", "w" : 615 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 1024, "resize" : "fit", "w" : 615 }, { "h" : 566, "resize" : "fit", "w" : 340 } ], "display_url" : "pic.twitter.com\/vaIlmI1aZg" } ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "473515594122153984", "geo" : { }, "id_str" : "473623276657184768", "in_reply_to_user_id" : 107336879, "text" : "@Jonathan_Blow http:\/\/t.co\/vaIlmI1aZg", "id" : 473623276657184768, "in_reply_to_status_id" : 473515594122153984, "created_at" : "2014-06-03 00:32:43 +0000", "in_reply_to_screen_name" : "Jonathan_Blow", "in_reply_to_user_id_str" : "107336879", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Duncan Keller", "screen_name" : "DuncanKeller", "indices" : [ 0, 13 ], "id_str" : "43443125", "id" : 43443125 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "473518191290105858", "geo" : { }, "id_str" : "473622817926180864", "in_reply_to_user_id" : 43443125, "text" : "@DuncanKeller Pro tip: Win + W searches settings.\n\nTry Win+W and type \"Audio Device\"", "id" : 473622817926180864, "in_reply_to_status_id" : 473518191290105858, "created_at" : "2014-06-03 00:30:53 +0000", "in_reply_to_screen_name" : "DuncanKeller", "in_reply_to_user_id_str" : "43443125", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Chris Remo", "screen_name" : "chrisremo", "indices" : [ 3, 13 ], "id_str" : "16792453", "id" : 16792453 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/chrisremo\/status\/473529423933628416\/photo\/1", "indices" : [ 33, 55 ], "url" : "http:\/\/t.co\/pe3mVlYFLQ", "media_url" : "http:\/\/pbs.twimg.com\/media\/BpJQgF7CcAAr3Ah.png", "id_str" : "473529423103160320", "id" : 473529423103160320, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BpJQgF7CcAAr3Ah.png", "sizes" : [ { "h" : 162, "resize" : "fit", "w" : 608 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 159, "resize" : "fit", "w" : 600 }, { "h" : 90, "resize" : "fit", "w" : 340 }, { "h" : 162, "resize" : "fit", "w" : 608 } ], "display_url" : "pic.twitter.com\/pe3mVlYFLQ" } ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "473618340804431872", "text" : "RT @chrisremo: God just fuck off http:\/\/t.co\/pe3mVlYFLQ", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/chrisremo\/status\/473529423933628416\/photo\/1", "indices" : [ 18, 40 ], "url" : "http:\/\/t.co\/pe3mVlYFLQ", "media_url" : "http:\/\/pbs.twimg.com\/media\/BpJQgF7CcAAr3Ah.png", "id_str" : "473529423103160320", "id" : 473529423103160320, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/BpJQgF7CcAAr3Ah.png", "sizes" : [ { "h" : 162, "resize" : "fit", "w" : 608 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 159, "resize" : "fit", "w" : 600 }, { "h" : 90, "resize" : "fit", "w" : 340 }, { "h" : 162, "resize" : "fit", "w" : 608 } ], "display_url" : "pic.twitter.com\/pe3mVlYFLQ" } ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "473529423933628416", "text" : "God just fuck off http:\/\/t.co\/pe3mVlYFLQ", "id" : 473529423933628416, "created_at" : "2014-06-02 18:19:47 +0000", "user" : { "name" : "Chris Remo", "screen_name" : "chrisremo", "protected" : false, "id_str" : "16792453", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/524703390186471424\/K6Qg0AAE_normal.jpeg", "id" : 16792453, "verified" : false } }, "id" : 473618340804431872, "created_at" : "2014-06-03 00:13:06 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "James Robert Somers", "screen_name" : "jsomau", "indices" : [ 0, 7 ], "id_str" : "93714279", "id" : 93714279 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "473423092606586880", "geo" : { }, "id_str" : "473433244377939969", "in_reply_to_user_id" : 93714279, "text" : "@jsomau Is it expensive? I'd leave the master race if I found a UI I could get behind. I'm hanging out for an Ubuntu phone.", "id" : 473433244377939969, "in_reply_to_status_id" : 473423092606586880, "created_at" : "2014-06-02 11:57:36 +0000", "in_reply_to_screen_name" : "jsomau", "in_reply_to_user_id_str" : "93714279", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "473332047172206592", "text" : "Cortana is blowing my brain", "id" : 473332047172206592, "created_at" : "2014-06-02 05:15:28 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"http:\/\/www.twitter.com\" rel=\"nofollow\"\u003ETwitter for Windows Phone\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "James Robert Somers", "screen_name" : "jsomau", "indices" : [ 0, 7 ], "id_str" : "93714279", "id" : 93714279 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "473210679445696512", "geo" : { }, "id_str" : "473245649828208640", "in_reply_to_user_id" : 93714279, "text" : "@jsomau 8, no question.", "id" : 473245649828208640, "in_reply_to_status_id" : 473210679445696512, "created_at" : "2014-06-01 23:32:10 +0000", "in_reply_to_screen_name" : "jsomau", "in_reply_to_user_id_str" : "93714279", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "473095226588790785", "text" : "Really sick of all these \"Learn X in 5 mins\" articles. I'd prefer \"Actually learn X in 3-4 hours\" articles.", "id" : 473095226588790785, "created_at" : "2014-06-01 13:34:26 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "473046056880455680", "text" : "Tried to get Phone gap working with Windows Phone. So far no luck. Moved onto making a mobile site for my band.", "id" : 473046056880455680, "created_at" : "2014-06-01 10:19:03 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "indices" : [ 3, 16 ], "id_str" : "2268581455", "id" : 2268581455 } ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/472648082320941056\/photo\/1", "indices" : [ 115, 137 ], "url" : "http:\/\/t.co\/QHpFJ44q2k", "media_url" : "http:\/\/pbs.twimg.com\/media\/Bo8u6glIMAAXJoA.jpg", "id_str" : "472648068610142208", "id" : 472648068610142208, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/Bo8u6glIMAAXJoA.jpg", "sizes" : [ { "h" : 443, "resize" : "fit", "w" : 400 }, { "h" : 443, "resize" : "fit", "w" : 400 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 376, "resize" : "fit", "w" : 340 }, { "h" : 443, "resize" : "fit", "w" : 400 } ], "display_url" : "pic.twitter.com\/QHpFJ44q2k" } ], "hashtags" : [ { "text" : "illustration", "indices" : [ 92, 105 ] }, { "text" : "surreal", "indices" : [ 106, 114 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "472996830460911616", "text" : "RT @ZoeAppleseed: A new piece i did the other day, im kinda obsessed with orange right now.\n#illustration #surreal http:\/\/t.co\/QHpFJ44q2k", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ { "expanded_url" : "http:\/\/twitter.com\/ZoeAppleseed\/status\/472648082320941056\/photo\/1", "indices" : [ 97, 119 ], "url" : "http:\/\/t.co\/QHpFJ44q2k", "media_url" : "http:\/\/pbs.twimg.com\/media\/Bo8u6glIMAAXJoA.jpg", "id_str" : "472648068610142208", "id" : 472648068610142208, "media_url_https" : "https:\/\/pbs.twimg.com\/media\/Bo8u6glIMAAXJoA.jpg", "sizes" : [ { "h" : 443, "resize" : "fit", "w" : 400 }, { "h" : 443, "resize" : "fit", "w" : 400 }, { "h" : 150, "resize" : "crop", "w" : 150 }, { "h" : 376, "resize" : "fit", "w" : 340 }, { "h" : 443, "resize" : "fit", "w" : 400 } ], "display_url" : "pic.twitter.com\/QHpFJ44q2k" } ], "hashtags" : [ { "text" : "illustration", "indices" : [ 74, 87 ] }, { "text" : "surreal", "indices" : [ 88, 96 ] } ], "urls" : [ ] }, "geo" : { }, "id_str" : "472648082320941056", "text" : "A new piece i did the other day, im kinda obsessed with orange right now.\n#illustration #surreal http:\/\/t.co\/QHpFJ44q2k", "id" : 472648082320941056, "created_at" : "2014-05-31 07:57:38 +0000", "user" : { "name" : "Zoe Calton", "screen_name" : "ZoeAppleseed", "protected" : false, "id_str" : "2268581455", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/577990416483545088\/mhOWEjUQ_normal.jpeg", "id" : 2268581455, "verified" : false } }, "id" : 472996830460911616, "created_at" : "2014-06-01 07:03:26 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "ThinkProgress", "screen_name" : "thinkprogress", "indices" : [ 3, 17 ], "id_str" : "55355654", "id" : 55355654 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ { "indices" : [ 102, 124 ], "url" : "http:\/\/t.co\/IDBiNTr80a", "expanded_url" : "http:\/\/thkpr.gs\/SMtaU0", "display_url" : "thkpr.gs\/SMtaU0" } ] }, "geo" : { }, "id_str" : "472996216062500864", "text" : "RT @thinkprogress: Leaving a homeless person on the streets: $31,065. \n\nGiving them housing: $10,051. http:\/\/t.co\/IDBiNTr80a", "retweeted_status" : { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ { "indices" : [ 83, 105 ], "url" : "http:\/\/t.co\/IDBiNTr80a", "expanded_url" : "http:\/\/thkpr.gs\/SMtaU0", "display_url" : "thkpr.gs\/SMtaU0" } ] }, "geo" : { }, "id_str" : "472836712586936320", "text" : "Leaving a homeless person on the streets: $31,065. \n\nGiving them housing: $10,051. http:\/\/t.co\/IDBiNTr80a", "id" : 472836712586936320, "created_at" : "2014-05-31 20:27:11 +0000", "user" : { "name" : "ThinkProgress", "screen_name" : "thinkprogress", "protected" : false, "id_str" : "55355654", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/573124349051346944\/LZG1vdNm_normal.png", "id" : 55355654, "verified" : true } }, "id" : 472996216062500864, "created_at" : "2014-06-01 07:01:00 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Casey Muratori", "screen_name" : "cmuratori", "indices" : [ 3, 13 ], "id_str" : "26452299", "id" : 26452299 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ { "indices" : [ 117, 139 ], "url" : "http:\/\/t.co\/SBpgeAZNuZ", "expanded_url" : "http:\/\/nymag.com\/news\/features\/laundry-apps-2014-5\/", "display_url" : "nymag.com\/news\/features\/\u2026" } ] }, "geo" : { }, "id_str" : "472995669246894080", "text" : "RT @cmuratori: This \"web-enabled laundry\" article is a great read, by what appears to be a rightly skeptical author: http:\/\/t.co\/SBpgeAZNuZ", "retweeted_status" : { "source" : "\u003Ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003ETwitter Web Client\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ { "indices" : [ 102, 124 ], "url" : "http:\/\/t.co\/SBpgeAZNuZ", "expanded_url" : "http:\/\/nymag.com\/news\/features\/laundry-apps-2014-5\/", "display_url" : "nymag.com\/news\/features\/\u2026" } ] }, "geo" : { }, "id_str" : "472941180024795136", "text" : "This \"web-enabled laundry\" article is a great read, by what appears to be a rightly skeptical author: http:\/\/t.co\/SBpgeAZNuZ", "id" : 472941180024795136, "created_at" : "2014-06-01 03:22:18 +0000", "user" : { "name" : "Casey Muratori", "screen_name" : "cmuratori", "protected" : false, "id_str" : "26452299", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/452880951710724096\/1d77bNCa_normal.jpeg", "id" : 26452299, "verified" : false } }, "id" : 472995669246894080, "created_at" : "2014-06-01 06:58:50 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ { "name" : "Chris Franklin", "screen_name" : "Campster", "indices" : [ 0, 9 ], "id_str" : "13640822", "id" : 13640822 } ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "in_reply_to_status_id_str" : "472894081203306496", "geo" : { }, "id_str" : "472985740561772544", "in_reply_to_user_id" : 13640822, "text" : "@Campster More criticism could help, but it could also recreate the same problem; too many games, and too many opinions.", "id" : 472985740561772544, "in_reply_to_status_id" : 472894081203306496, "created_at" : "2014-06-01 06:19:22 +0000", "in_reply_to_screen_name" : "Campster", "in_reply_to_user_id_str" : "13640822", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } }, { "source" : "\u003Ca href=\"https:\/\/about.twitter.com\/products\/tweetdeck\" rel=\"nofollow\"\u003ETweetDeck\u003C\/a\u003E", "entities" : { "user_mentions" : [ ], "media" : [ ], "hashtags" : [ ], "urls" : [ ] }, "geo" : { }, "id_str" : "472860946247860225", "text" : "Visual Studio: \"We are just getting things ready...\"\n\nSublime Text: *Opens Immediately*", "id" : 472860946247860225, "created_at" : "2014-05-31 22:03:29 +0000", "user" : { "name" : "James Forbes", "screen_name" : "james_a_forbes", "protected" : false, "id_str" : "16025792", "profile_image_url_https" : "https:\/\/pbs.twimg.com\/profile_images\/571253075579396096\/_csqQudw_normal.jpeg", "id" : 16025792, "verified" : false } } ]
/** @format */ const mongoose = require("mongoose"); const Schema = mongoose.Schema; // Create Schema const StartupSchema = new Schema( { role: { type: String, default: 100 }, handle: { type: String, required: true }, fname: { type: String, required: true }, mname: { type: String, required: true }, lname: { type: String, required: true }, isVerified: { type: Boolean, default: false }, mail: { type: String, required: true }, isEmailVerified: { type: Boolean, default: false }, phone: { type: Number, required: true }, dob: { type: Date, required: false }, residential_Address: { type: String, required: true }, company_Address: { type: String, required: true }, profession: { type: String, required: true }, qualification: { type: String, required: true }, perious_startup: { type: String, required: true }, description: { type: String, required: true }, startupDetails: { domain: { type: String, required: true }, industryType: { type: String, required: true }, numberOfColleaugues: { type: String, required: true }, }, updated: { type: Date, default: Date.now }, }, { collection: "startups", } ); module.exports = Startups = mongoose.model("startups", StartupSchema);
import { curry } from "../curry/curry" /** * Less compare. * * Since this will mostly be used in pipe, the first param in the curry chain * is the second operand. * * @param {number} second Second number * @param {number} first First number * * @returns {boolean} * * @tag Core * @signarute (first: number) => (second: number): boolean * * @example * lt(10)(4) * // => true * lt(10)(14) * // => false */ export const lt = curry((second, first) => first < second)
function Tile(locationNumber, id) { this.locationNumber = locationNumber; this.id = id; this.value = 2; this.currentTurn = new Turn(); } Tile.prototype = { getTurnInfo: function(direction) { this.locationNumber = this.getEndingLocation(direction); this.findCollisions(direction); }, move: function(direction) { UI.moveTile({ value: this.value, spacesToMove: this.currentTurn.spacesToMove, direction: direction, willDouble: this.currentTurn.willDouble, willDisappear: this.currentTurn.willDisappear, id: this.id }); }, findCollisions: function(direction) { var numberTilesToScan = Gameboard.tiles.indexOf(this), tileToCompare; for (var i = 0; i < numberTilesToScan; i++) { tileToCompare = Gameboard.tiles[i]; if (this.collidesWithNextTile(tileToCompare, direction)) { this.currentTurn.willDisappear = true; tileToCompare.value *= 2; tileToCompare.currentTurn.willDouble = true; Gameboard.score += tileToCompare.value; } } }, collidesWithNextTile: function(nextTile, direction) { var hasSameValue = this.value === nextTile.value; var isNotDisappearing = !nextTile.currentTurn.willDisappear; var areTouchingOnCorrectSide = this.areTouchingOnCorrectSide(nextTile.locationNumber, direction); return hasSameValue && isNotDisappearing && areTouchingOnCorrectSide; }, areTouchingOnCorrectSide: function(otherTileLocationNumber, direction) { var areTouching; switch (direction) { case 'up': areTouching = this.locationNumber - otherTileLocationNumber == Gameboard.SIZE; break; case 'down': areTouching = otherTileLocationNumber - this.locationNumber == Gameboard.SIZE; break; case 'right': areTouching = otherTileLocationNumber - this.locationNumber == 1; break; case 'left': areTouching = otherTileLocationNumber - this.locationNumber == -1; break; } return areTouching; }, getStartingValue: function() { return this.currentTurn.hasMoved && this.currentTurn.willDouble ? this.value / 2 : this.value; }, getEndingLocation: function(direction) { var spacesToMove = this.getNumberSpacesToMove(direction), tileLocationAfterMove; this.currentTurn.spacesToMove = spacesToMove; switch (direction) { case 'up': tileLocationAfterMove = this.locationNumber - (Gameboard.SIZE * spacesToMove); break; case 'down': tileLocationAfterMove = this.locationNumber + (Gameboard.SIZE * spacesToMove); break; case 'right': tileLocationAfterMove = this.locationNumber + spacesToMove; break; case 'left': tileLocationAfterMove = this.locationNumber - spacesToMove; break; } return tileLocationAfterMove; }, getNumberSpacesToMove: function(direction) { var spacesToMove = this.getMaxSpacesToMove(direction), len = Gameboard.tiles.length, tileToCompare; for (var i = 0; i < len; i++) { tileToCompare = Gameboard.tiles[i]; if (this.tileIsInTheWay(tileToCompare, direction)) { spacesToMove--; } } return spacesToMove; }, getMaxSpacesToMove: function(direction) { var result; switch (direction) { case 'up': result = Math.floor(this.locationNumber / Gameboard.SIZE); break; case 'down': result = Gameboard.SIZE - 1 - Math.floor(this.locationNumber / Gameboard.SIZE); break; case 'left': result = this.locationNumber % Gameboard.SIZE; break; case 'right': result = Gameboard.SIZE - 1 - this.locationNumber % Gameboard.SIZE; break; } return result; }, tileIsInTheWay: function(nextTile, direction) { return !nextTile.currentTurn.willDisappear && this.isInTilePath(direction, nextTile.locationNumber); }, isInTilePath: function(direction, tempTileLocation) { var isInCorrectDirection, isOnStraightLinePath; switch (direction) { case 'up': isInCorrectDirection = tempTileLocation < this.locationNumber; isOnStraightLinePath = (tempTileLocation % Gameboard.SIZE) == (this.locationNumber % Gameboard.SIZE); break; case 'down': isInCorrectDirection = tempTileLocation > this.locationNumber; isOnStraightLinePath = (tempTileLocation % Gameboard.SIZE) == (this.locationNumber % Gameboard.SIZE); break; case 'left': isInCorrectDirection = tempTileLocation < this.locationNumber; isOnStraightLinePath = Math.floor(tempTileLocation / Gameboard.SIZE) == Math.floor(this.locationNumber / Gameboard.SIZE) break; case 'right': isInCorrectDirection = tempTileLocation > this.locationNumber; isOnStraightLinePath = Math.floor(tempTileLocation / Gameboard.SIZE) == Math.floor(this.locationNumber / Gameboard.SIZE) break; } return isInCorrectDirection && isOnStraightLinePath; } }; var TileFactory = { createNewTile: function(tile) { var pos = UI.getTilePosition(tile.locationNumber); var tileElement = document.createElement("div"); tileElement.id = tile.id; tileElement.className = "tile value2"; tileElement.innerHTML = 2; tileElement.style.width = UI.getCellSideLength() + "px"; tileElement.style.height = UI.getCellSideLength() + "px"; tileElement.style.left = pos.left + "px"; tileElement.style.bottom = pos.bottom + "px"; return tileElement; } };
function solve(args) { for(let line of args){ let townData = line.split('|').trim(), townName = townData[1], income = Number(townData[2]); console.log(townName); console.log(income); } } solve(['| Sofia | 300', '| Veliko Tarnovo | 500', '| Yambol | 275'] );
import * as PropTypes from 'prop-types'; import * as React from 'react'; import './Tooltip.css'; import { uuid4 } from '../../utils/utils'; /** * @uxpincomponent * @uxpinwrappers * SkipContainerWrapper */ export default function Tooltip(props) { const uuid = uuid4(); const initialize = setInterval(() => { if (window.chi && document.getElementById(uuid)) { window.chi.tooltip(document.getElementById(uuid)); clearInterval(initialize); } }, 100); return ( <button type="button" id={uuid} data-tooltip={props.message} data-position={props.position} className={` chi-button -icon ${props.size ? `-${props.size}` : ''} ${props.flat ? '-flat' : ''} `} disabled={props.disabled} onClick={props.click} onMouseEnter={props.mouseOver} onMouseLeave={props.mouseLeave} onMouseDown={props.mouseDown} onMouseUp={props.mouseUp}> <div className="chi-button__content"> <i className={`chi-icon icon-${props.icon}`}></i> </div> </button> ); } /* eslint-disable */ Tooltip.propTypes = { disabled: PropTypes.bool, icon: PropTypes.string, click: PropTypes.func, flat: PropTypes.bool, mouseDown: PropTypes.func, mouseUp: PropTypes.func, mouseOver: PropTypes.func, mouseLeave: PropTypes.func, size: PropTypes.oneOf(['sm', 'md', 'lg', 'xl']), message: PropTypes.string, position: PropTypes.oneOf(['top', 'right', 'bottom', 'left']), }; /* eslint-enable */ Tooltip.defaultProps = { disabled: false, icon: 'atom', size: 'md', message: 'Tooltip message goes here', position: 'top', };
export class BaseEvent { constructor(title, time) { this.title = title; this.time = time; } static copyEvent(event) { return new BaseEvent( event.title, new Date(event.time.getTime()) ); } }
import { GraphQLObjectType, GraphQLNonNull, GraphQLFloat } from 'graphql'; import testType from '../types/testType'; export default { test: { type: testType, resolve: (root) => { return { message: 'Test' }; } } };
class Display { constructor(game, parent, zoom) { this.canvas = document.createElement('canvas'); this.cx = this.canvas.getContext("2d", { alpha: false }); this.lastTime = null; this.zoom = zoom; this.game = game; this.animationTime = this.game.relativeFrame; this.canvas.width = this.game.size.x * this.zoom; this.canvas.height = this.game.size.y * this.zoom; parent.appendChild(this.canvas); this.cx.scale(this.zoom, this.zoom); this.cx.imageSmoothingEnabled = false; this.swordAttack = false; this.swordFrame = 24; this.drawFrame = (time, zoom, leaderboard) => { this.drawBackground(); this.game.enemies.forEach(enemy => this.drawEnemy(enemy)); this.drawPlayer(this.game.player); if (this.lastTime) this.hud(time); this.lastTime = time; this.animationTime = this.game.relativeFrame; if (zoom !== this.zoom) { this.zoom = zoom; this.canvas.width = this.game.size.x * this.zoom; this.canvas.height = this.game.size.y * this.zoom; this.cx.scale(this.zoom, this.zoom); this.cx.imageSmoothingEnabled = false; } this.drawMouseLine(); this.drawLeaderboard(leaderboard); }; this.drawSword = player => { var swordImg = document.createElement("img"); swordImg.src = "img/sword.png"; this.cx.drawImage(swordImg, (18 - this.swordFrame) * 192, 0, 192, 192, player.pos.x + player.size.x / 2 - 96, player.pos.y + player.size.y / 2 - 96, 192, 192); this.swordFrame--; if (this.swordFrame < 0) this.swordFrame = 18; } this.drawLeaderboard = leaderboard => { var lead = document.createElement("img"); lead.src = "img/leaderboard.png"; this.cx.drawImage(lead, 0, 0, 80, 160, this.game.size.x - 80, 16, 80, 160); var newleaderboard = leaderboard.sort((a, b) => b.score - a.score); this.cx.fillStyle = "#fff"; this.cx.font = "6px serif"; this.cx.textAlign = "center"; this.cx.fillText('Leaderboard', this.game.size.x - 40, 26); newleaderboard.forEach((player, i) => { if (i < 10) { this.cx.textAlign = "left"; this.cx.fillText(player.name, this.game.size.x - 74, 34 + i * 8); this.cx.textAlign = "right"; var zeros = ''; for (let i = 0; i < 8 - player.score.toString().length; i++) zeros += '0'; this.cx.fillText(zeros + player.score, this.game.size.x - 6, 34 + i * 8); } }); } this.drawMouseLine = () => { if (this.game.mouse.startLine && this.game.mouse.endLine) { this.cx.lineWidth = 3; this.cx.strokeStyle = "#77f"; this.cx.beginPath(); this.cx.moveTo(this.game.mouse.startLine.x, this.game.mouse.startLine.y); this.cx.lineTo(this.game.mouse.endLine.x, this.game.mouse.endLine.y); this.cx.stroke(); this.cx.lineWidth = 2; this.cx.strokeStyle = "#fff"; this.cx.beginPath(); this.cx.moveTo(this.game.mouse.startLine.x, this.game.mouse.startLine.y); this.cx.lineTo(this.game.mouse.endLine.x, this.game.mouse.endLine.y); this.cx.stroke(); } } this.drawMyon = () => { this.game.mouse.history.forEach((pos, i) => { this.cx.fillStyle = "#fff"; this.cx.globalAlpha = i / this.game.mouse.history.length; this.cx.beginPath(); this.cx.arc(pos.x, pos.y, i / 2, 0, 2 * Math.PI); this.cx.fill(); }); this.cx.globalAlpha = 1; } this.hud = (time) => { var hudName = document.createElement("img"); hudName.src = "img/hud.png"; this.cx.drawImage(hudName, 0, 0, 128, 32, 0, 0, 128, 32); var hudName2 = document.createElement("img"); hudName2.src = "img/hud2.png"; this.cx.drawImage(hudName2, 0, 0, 128, 16, this.game.size.x - 128, 0, 128, 16); var player = this.game.player; this.cx.fillStyle = "#fff"; this.cx.textAlign = "right"; this.cx.font = "6px serif"; var zeros = ''; for (let i = 0; i < 8 - this.game.score.toString().length; i++) zeros += '0'; this.cx.fillText(zeros + this.game.score, this.game.size.x - 4, 10); this.cx.textAlign = "left"; this.cx.fillText(player.name, 4, 10); if (player.charge) { for (let i = 0; i < 100; i++) { if (i <= player.charge) player.charge === 100 && player.animationTime % 2 === 0 ? this.cx.fillStyle = "#000" : this.cx.fillStyle = "#fff"; else this.cx.fillStyle = "#000"; if (player.chargeMax && i < player.slowMotionTime * 100 / 64) this.cx.fillStyle = '#0f0'; this.cx.fillRect(4 + i, 16, 1, 2); } } } this.drawBackground = () => { var back1 = document.createElement("img"); back1.src = "img/back1.png"; this.cx.drawImage(back1, 0, 0, 512, 256, 0, 0, 512, 256); if (this.game.player && this.game.player.action === 'charge') this.drawSakura(); var back = document.createElement("img"); back.src = "img/back.png"; this.cx.drawImage(back, 0, 0, 512, 256, 0, 0, 512, 256); } this.sakura = 8; this.drawSakura = () => { this.sakuraHistory = this.game.player.chargeMax ? this.sakuraHistory < this.sakura ? this.sakuraHistory + 1 : this.sakuraHistory : 1; var sakura = document.createElement("img"); sakura.src = "img/sakura.png"; this.cx.fillStyle = "#224"; this.cx.globalAlpha = this.game.player.charge / 100 / 2; this.cx.fillRect(0, 0, this.game.size.x, this.game.size.y); this.cx.globalAlpha = this.game.player.charge / 100; this.cx.translate(this.game.size.x / 2, this.game.size.y / 2); for (let i = 0; i < this.sakuraHistory; i++) { this.cx.rotate(-((this.animationTime + i) * 2 % 360 * Math.PI / 180)); this.cx.drawImage(sakura, 0, 0, 512, 512, -256, -256, 512, 512); this.cx.rotate((this.animationTime + i) * 2 % 360 * Math.PI / 180); } this.cx.translate(-this.game.size.x / 2, -this.game.size.y / 2); this.cx.globalAlpha = 1; } this.drawMagic = (posX, posY) => { var magic = document.createElement("img"); magic.src = "img/magic.png"; var magic2 = document.createElement("img"); magic2.src = "img/magic2.png"; var size = this.game.player.chargeMax ? 128 : 64; this.cx.translate(posX, posY); this.cx.rotate(this.animationTime * 2 % 360 * Math.PI / 180); this.cx.drawImage(magic, 0, 0, 64, 64, -size / 2, -size / 2, size, size); this.cx.rotate(-(this.animationTime * 2 % 360 * Math.PI / 180)); this.cx.rotate(-(this.animationTime % 360 * Math.PI / 180)); this.cx.drawImage(magic2, 0, 0, 64, 64, -size / 2, -size / 2, size, size); this.cx.rotate(this.animationTime % 360 * Math.PI / 180); this.cx.translate(-posX, -posY); } this.drawPlayerShadow = (spriteX, width, height, centerX, centerY) => { var shadow = document.createElement("img"); shadow.src = "img/youmu.png"; var amplitude = Math.floor(Math.sin(this.game.player.animationTime * 0.1) * 2) + 2; this.cx.drawImage(shadow, spriteX * width, 3 * height, width, height, centerX - width / 2 - amplitude, centerY - height / 2 - amplitude / 2, width + amplitude * 2, height + amplitude); } this.drawPlayer = (player) => { var width = 64; var height = 64; var posX = player.pos.x; var posY = player.pos.y; var centerX = posX + player.size.x / 2; var centerY = posY + player.size.y / 2; var spriteY = 0; if (player.touched) { spriteY = 4; var spriteX = Math.floor(player.animationTime / 4) % 2; } else { if (player.action === 'charge' || player.action === 'stand') { if (player.animationKey < 8 * this.game.step * player.stepModifier) { spriteY = 1; if (player.animationKey === 0) player.animationTime = 0; player.animationKey += 1 / 4 * this.game.step * player.stepModifier; } else spriteY = 2; } else player.animationKey = 0; var spriteX = Math.floor(player.animationTime / 8) % 4; } var sprites = document.createElement("img"); sprites.src = "img/youmu.png"; this.drawMagic(centerX, centerY); this.drawMyon(); this.cx.save(); if (!player.direction) { this.flipHorizontally(this.cx, posX + player.size.x / 2); } if (player.charge) this.drawPlayerShadow(spriteX, width, height, centerX, centerY); this.cx.drawImage(sprites, spriteX * width, spriteY * height, width, height, centerX - width / 2, centerY - height / 2, width, height); this.cx.restore(); if (player.focus) { this.cx.fillStyle = "#f008"; this.cx.fillRect(posX, posY, player.size.x, player.size.y); } if (player.endCircle || this.swordFrame !== 18) { this.drawSword(player); } } this.drawEnemy = enemy => { var posX = enemy.pos.x; var posY = enemy.pos.y; var enemyImg = document.createElement("img"); enemyImg.src = "img/fairy" + enemy.color + ".png"; this.cx.save(); if (posX > this.game.player.pos.x) this.flipHorizontally(this.cx, posX + enemy.size.x / 2); if (enemy.touched) this.cx.drawImage(enemyImg, Math.floor(this.animationTime / 4) % 2 * 24, 24, 24, 24, posX, posY, 24, 24); else this.cx.drawImage(enemyImg, Math.floor(this.animationTime / 16) % 2 * 24, 0, 24, 24, posX, posY, 24, 24); this.cx.restore(); } this.flipHorizontally = (context, around) => { context.translate(around, 0); context.scale(-1, 1); context.translate(-around, 0); }; } }
import React, { Component } from 'react'; import { Card, CardHeader, Col, Row } from 'reactstrap'; import Spinner from '../../common/Spinner'; import axios from 'axios'; import LocationCategoryItem from './LocationCategoryItem'; import Empty from '../../common/Empty'; class LocationCategory extends Component { constructor(props) { super(props); this.state = { locationCategories: [], isLoading: true, name: '', newName: '', typeLocationEdit:"", typeLocation:'' } } componentDidMount() { this._requestGetAllLocationCategories(); } _requestGetAllLocationCategories = () => { axios.get('/api/location/locationCategories').then(res => { this.setState({ locationCategories: res.data.locationCategories, isLoading: false }) }).catch(err => { //todo }); } _onDeleteItem = () => { const data = { id: this.state.itemId, field: 'hiddenFlag', value: !this.state.deletionFlg } axios.put('/api/admin/location/updateLocationCategories', data).then(res => { this._requestGetAllLocationCategories(); }).catch(err => { //todo }); } _onChangeNameCategory = () => { if (this.state.name === '') { this.refs.editErrMsg.innerHTML = "Vui lòng không bỏ trống!"; return; } if (this.state.name.trim() === this.oldName) { this.refs.editErrMsg.innerHTML = "Bạn chưa thay đổi!"; return; } const abc = { id: this.state.itemId, field: 'name', value: this.state.name } axios.put('/api/admin/location/updateLocationCategories', abc).then(res => { this.refs.editErrMsg.innerHTML = ""; this._requestGetAllLocationCategories(); window.hideEditModalLocation(); }).catch(err => { this.refs.editErrMsg.innerHTML = err.response.data.error.message; }); } _onAddNewCategory = () => { if (this.state.newName === '') { this.refs.addErrMsg.innerHTML = "Vui lòng không bỏ trống!"; return; } const data = { name: this.state.newName, typeLocation: Number(this.state.typeLocation )} axios.post('/api/admin/location/addLocationCategory', data).then(res => { this._requestGetAllLocationCategories(); this.refs.addErrMsg.innerHTML = ""; window.hideAddModalLocation(); }).catch(err => { this.refs.addErrMsg.innerHTML = err.response.data.error.message; }); } deleteHandle = (obj) => { this.oldName = obj.name; this.setState({ name: obj.name, itemId: obj.id, deletionFlg: obj.deletionFlag, typeLocationEdit: Number(obj.typeLocation) }) } _onSearch = (e) => { if(this.state.locationCategories.length !== 0) this._inputSearchAll(e); } _inputSearch = (e, val) =>{ const list = this.refs.search.getElementsByClassName('nameItemValue'); const listCheck = this.refs.search.getElementsByClassName('statusFlagLocation'); const itemm = this.refs.search.getElementsByClassName('itemSearchLocation'); for (let i = 0; i < list.length; i++) { if (list[i].innerHTML.toLowerCase().indexOf(e.target.value.toLowerCase()) > -1 && listCheck[i].value === val ) { itemm[i].style.display = ''; } else { itemm[i].style.display = 'none'; } } } _inputSearchAll = (e, val) =>{ const list = this.refs.search.getElementsByClassName('nameItemValue'); const itemm = this.refs.search.getElementsByClassName('itemSearchLocation'); for (let i = 0; i < list.length; i++) { if (list[i].innerHTML.toLowerCase().indexOf(e.target.value.toLowerCase()) > -1 ) { itemm[i].style.display = ''; } else { itemm[i].style.display = 'none'; } } } oldName = ''; onChange = (e) => { if(e.target.name==="typeLocationEdit") this.setState({ [e.target.name]: Number(e.target.value) }); else this.setState({ [e.target.name]: e.target.value }); } deleteHandle = (obj) => { this.oldName = obj.name; this.setState({ name: obj.name, itemId: obj.id, deletionFlg: obj.deletionFlag,typeLocationEdit:obj.typeLocation }) } _filter = (val) => { const list = this.refs.search.getElementsByClassName('statusFlagLocation'); const itemm = this.refs.search.getElementsByClassName('itemSearchLocation'); for (let i = 0; i < list.length; i++) { if (list[i].value === val) { itemm[i].style.display = ''; } else { itemm[i].style.display = 'none'; } } } _filterByStatus = (e) => { this._showAll(); } _showAll = () => { const itemm = this.refs.search.getElementsByClassName('itemSearchLocation'); for (let i = 0; i < itemm.length; i++) { itemm[i].style.display = ''; } } render() { const { locationCategories, isLoading } = this.state; return ( <div> <Row> <Col> <Card > <CardHeader> <div className="form-group row"> <input className="form-control col-sm-2" placeholder="Tìm theo tên" onChange={this._onSearch} name="name" style={{marginLeft:30,marginRight:20,marginTop:-5}}/> <div style={{display:"none"}}> <div className="form-check form-check-inline"> <input className="form-check-input" onClick={this._filterByStatus} type="checkbox" id="inlineCheckbox1" ref='all' name="all" /> <label className="form-check-label" htmlFor="inlineCheckbox1">Tất cả</label> </div> <div className="form-check form-check-inline"> <input className="form-check-input" onClick={this._filterByStatus} type="checkbox" id="inlineCheckbox2" ref='on' name="on"/> <label className="form-check-label" htmlFor="inlineCheckbox2">Hoạt động</label> </div> <div className="form-check form-check-inline"> <input className="form-check-input" onClick={this._filterByStatus} type="checkbox" id="inlineCheckbox3" ref='off' name="off"/> <label className="form-check-label" htmlFor="inlineCheckbox3">Không hoạt động</label> </div> </div> <div className="card-header-actions"> <button type="button" className="btn btn-primary" data-toggle="modal" data-target="#addModalLocation"><i className="fa fa-plus"></i> Thêm mới</button> </div> </div> </CardHeader> </Card> </Col></Row> <div ref="search"> <Row> {locationCategories === null || isLoading ? <Spinner /> :(locationCategories.length === 0? <Empty/> : locationCategories.map((item, index) => (<LocationCategoryItem onDeleteHandle={this.deleteHandle} locationCate={item} key={index} />)))} </Row> <div className="modal fade" id="deleteModalLocation" tabIndex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div className="modal-dialog" role="document"> <div className="modal-content"> <div className="modal-body"> <h4> Bạn có chắc chắn muốn {this.state.deletionFlg ? 'hiện' : 'ẩn'} {this.oldName} ?</h4> </div> <div className="modal-footer"> <button type="button" className="btn btn-secondary" data-dismiss="modal">Hủy</button> <button type="button" onClick={this._onDeleteItem} data-dismiss="modal" className="btn btn-primary">Đồng ý</button> </div> </div> </div> </div> {/* Edit modal */} <div className="modal fade" id="editModalLocation" tabIndex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div className="modal-dialog" role="document"> <div className="modal-content"> <div className="modal-header"> <h4> Sửa tên thể loại</h4> </div> <div className="modal-body"> <input className="form-control" onChange={this.onChange} name="name" value={this.state.name} /> <small ref='editErrMsg' className="" style={{ color: 'red' }}></small> <br/> <div className="form-check"> <input className="form-check-input" type="radio" name="typeLocationEdit" ref="publicEditL" onChange={this.onChange} checked={this.state.typeLocationEdit ===2} id="publicLocation" value="2"/> <label className="form-check-label" htmlFor="publicLocation"> Địa điểm công cộng </label> </div> <div className="form-check"> <input className="form-check-input" type="radio" name="typeLocationEdit" ref="privateEditL" onChange={this.onChange} checked={this.state.typeLocationEdit ===1} id="privateLocaton" value="1"/> <label className="form-check-label" htmlFor="privateLocaton"> Địa điểm cá nhân </label> </div> </div> <div className="modal-footer"> <button type="button" className="btn btn-secondary" data-dismiss="modal">Hủy</button> <button type="button" onClick={this._onChangeNameCategory} className="btn btn-primary">Đồng ý</button> </div> </div> </div> </div> {/* add modal */} <div className="modal fade" id="addModalLocation" tabIndex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div className="modal-dialog" role="document"> <div className="modal-content"> <div className="modal-header"> <h4> Thêm thể loại</h4> </div> <div className="modal-body"> <input className="form-control" onChange={this.onChange} name="newName" placeholder="nhập tên ..." value={this.state.newName} /> <small ref='addErrMsg' className="" style={{ color: 'red' }}></small> <br/> <div className="form-check"> <input className="form-check-input" type="radio" name="typeLocation" onChange={this.onChange} id="publicLocation1" value="2" defaultChecked/> <label className="form-check-label" htmlFor="publicLocation1"> Địa điểm công cộng </label> </div> <div className="form-check"> <input className="form-check-input" type="radio" name="typeLocation" onChange={this.onChange} id="privateLocaton1" value="1"/> <label className="form-check-label" htmlFor="privateLocaton1"> Địa điểm cá nhân </label> </div> <small ref='addErrMsg' className="" style={{ color: 'red' }}></small> </div> <div className="modal-footer"> <button type="button" className="btn btn-secondary" data-dismiss="modal">Hủy</button> <button type="button" onClick={this._onAddNewCategory} className="btn btn-primary">Lưu</button> </div> </div> </div> </div> </div> </div>) } } export default LocationCategory;
import React from 'react' import { Link } from 'react-router-dom' const AlbumItem = ({ element, onDelete, onUpdate }) => { return ( <div className="col" key={element.id}> <div className="card shadow-sm"> <Link to={"/products/" + element.id}> <img src={element.avatar} alt="" /> </Link> <div className="card-body"> <p className="card-text">{element.name}</p> <div className="d-flex justify-content-between align-items-center"> <div className="btn-group"> <Link to={"update-product/" + element.id}> <button type="button" className="btn btn-sm btn-outline-secondary" >Sửa</button> </Link> <button type="button" onClick={() => onDelete(element.id)} className="btn btn-sm btn-outline-secondary">Xóa</button> </div> <small className="text-muted">9 mins</small> </div> </div> </div> </div> ) } export default AlbumItem
const mongoose = require('mongoose'), Teacher = require('../Schemas/Teacher.js'), file_system = require('fs'), path = require('path'), util = require('util'), json_file = require('jsonfile'); module.exports = () => { Teacher.find( { }, (err, teachers) => { teachers.forEach( (teacher) => { util.log(`Teacher: ${teacher.lastName}`); json_file.writeFile( // Creating file names // Result: name.id.json path.join( 'teachers', '/', teacher .lastName .toLowerCase() + '.' + teacher ._id .toString() + '.json' ), // Writing our teacher object to the file teacher, // Spacing for readability { spaces: 2 }, (err) => { if (err) throw err; } ) }) } ); }
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MakeService = void 0; const BaseService_1 = require("./interfaces/base/BaseService"); const MakeSchema_1 = require("../../app/persistance/schemas/MakeSchema"); class MakeService extends BaseService_1.BaseService { constructor() { super(MakeSchema_1.Make); } } exports.MakeService = MakeService;
const express = require('express'); const router = express.Router(); const mcache = require('memory-cache'); const customerService = require('./customer.service'); const cache = require('../shared/cache'); function create(req, res, next) { customerService.create(req.body) .then(() => { mcache.del('customers'); res.json({}); }) .catch(err => next(err)); } function getAll(req, res, next) { customerService.getAll() .then(customers => res.json(customers)) .catch(err => next(err)); } function getById(req, res, next) { customerService.getById(req.params.id) .then(customer => customer ? res.json(customer) : res.sendStatus(404)) .catch(err => next(err)); } function getByPhone(req, res, next) { customerService.getByPhone(req.params.phone) .then(customer => customer ? res.json(customer) : res.sendStatus(404)) .catch(err => next(err)); } function update(req, res, next) { customerService.update(req.params.id, req.body) .then(() => { mcache.del('customers'); res.json({}); }) .catch(err => next(err)); } function _delete(req, res, next) { customerService.delete(req.params.id) .then(() => { mcache.del('customers'); res.json({}); }) .catch(err => next(err)); } // routes router.post('/create', create); router.get('/', cache.applyCache(300, 'customers'), getAll); router.get('/:id', getById); router.get('/getByPhone/:phone', getByPhone); router.put('/:id', update); router.delete('/:id', _delete); module.exports = router;
import React, { Component } from "react"; export class Contact extends Component { render() { return ( <div> <div id="contact"> <div className="container"> <div className="col-md-8"> <div className="row"> <h1>Get in touch <i className="fa fa-phone-square"></i>&nbsp; <i className="fa fa-envelope"></i>&nbsp; <i className="fa fa-map-marker"></i> </h1> </div> <div className="row"> <h1>Follow us on &nbsp; <a aria-label="facebook" href="https://www.facebook.com/SLDElectrical.ie/" className="fa fa-facebook social-media-icon"></a>&nbsp; <a aria-label="linkedin" href="https://www.linkedin.com/in/sean-deery-7b1616209/?originalSubdomain=ie" className="fa fa-linkedin social-media-icon"></a>&nbsp; <a aria-label="instagram" href="https://www.instagram.com/sldelectrical.ie" className="fa fa-instagram social-media-icon"></a>&nbsp; </h1> </div> <div className="row"> <iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2FSLDElectrical.ie%2F&tabs=timeline&width=340&height=500&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true&appId" width="340" height="500" scrolling="no" frameBorder="0" allowFullScreen="true" allow="autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share"> </iframe> </div> </div> <div className="col-md-3 col-md-offset-1 contact-info"> <div className="contact-item"> <h3>Contact Info</h3> </div> <div className="contact-item"> <p> <span> <i className="fa fa-phone"></i> Phone </span>{" "} {this.props.data ? this.props.data.phone : "loading"} </p> </div> <div className="contact-item"> <p> <span> <i className="fa fa-envelope-o"></i> Email </span>{" "} {this.props.data ? this.props.data.email : "loading"} </p> </div> </div> <div className="col-md-12"> <div className="row"> </div> </div> </div> </div> <div id="footer"> <div className="container text-center"> <p> &copy; 2021 SLD Electrical. </p> </div> </div> </div> ); } } export default Contact;
var assert = require("chai").assert; var stocks = require("../stocks"); describe("stock market", function () { it("should return 16 if it works (brute)", function () { var num = [45, 24, 35, 31, 40, 38, 11]; var result = stocks.findMaxBrute(num); assert.equal(result, 16); }); it("should return 16 if it works (elegant)", function () { var num = [45, 24, 35, 31, 40, 38, 11]; var result = stocks.findMaxElegant(num); assert.equal(result, 16); }); });
//jshint esversion:6 const path=require('path'); let pathObj=path.parse(__filename); console.log(pathObj);
import React, { useState, useContext } from "react"; import { makeStyles } from "@material-ui/core/styles"; import Card from "@material-ui/core/Card"; import Modal from "@material-ui/core/Modal"; import Fade from '@material-ui/core/Fade'; import CardContent from "@material-ui/core/CardContent"; import Typography from "@material-ui/core/Typography"; import IconButton from "@material-ui/core/IconButton"; import DeleteIcon from "@material-ui/icons/Delete"; import UserContext from "../../context/user/userContext"; import CourseContext from "../../context/course/courseContext"; const useStyles = makeStyles(() => ({ card: { display: "grid", placeItems: "center", width: "11.25rem", height: "11.25rem", border: "2px solid #C4C4C4", boxShadow: "0px 4px 4px rgba(0, 0, 0, 0.25)", position: "relative", }, deleteButton: { position: "absolute", top: "0.1rem", right: "0.1rem", }, modal: { display: "flex", alignItems: "center", justifyContent: "center", }, paper: { height: '150px', width: '350px', padding: '1rem', backgroundColor: '#ffffff', border: '1px solid #E5E5E5', borderRadius: '5px 5px 5px 5px', boxShadow: "0 4px 8px 0 rgba(0,0,0,0.2)", '& button': { margin: '3rem 0.5rem 0.5rem 0.5rem', border: '1px solid #E5E5E5', borderRadius: '5px 5px 5px 5px', } } })); function CourseCard(props) { const classes = useStyles(); const [isModalOpen, setIsModalOpen] = useState(false); const [isShown, setIsShown] = useState(false); const userContext = useContext(UserContext); const courseContext = useContext(CourseContext); const handleDeleteCourse = () => { courseContext.deleteCourse({ userID: userContext.userID, courseID: props.courseID, }); }; const handleModalOpen = () => { setIsModalOpen(true); }; const handleModalClose = () => { setIsModalOpen(false); }; const renderModal = ( <div className={classes.paper}> <span>Are you sure you want to un-enroll?</span> <button onClick={handleModalClose}>Cancel</button> <button onClick={handleDeleteCourse}>Yes, delete</button> </div> ); return ( <div> <Card className={classes.card} onMouseEnter={() => setIsShown(true)} onMouseLeave={() => setIsShown(false)} > {isShown && ( <IconButton className={classes.deleteButton} onClick={handleModalOpen} > <DeleteIcon fontSize="small" /> </IconButton> )} <CardContent> <Typography variant="h5">{props.courseNumber}</Typography> </CardContent> </Card> <Modal className={classes.modal} open={isModalOpen} onClose={handleModalClose} > <Fade in={isModalOpen}> {renderModal} </Fade> </Modal> </div> ); } export default CourseCard;
//src/firebase.js import firebase from 'firebase' var config = { apiKey: "AIzaSyB1e0tgJRp8vAjXps3_qGA_8O5QV-WO50A", authDomain: "pirates-c17bc.firebaseapp.com", databaseURL: "https://pirates-c17bc.firebaseio.com", projectId: "pirates-c17bc", storageBucket: "pirates-c17bc.appspot.com", messagingSenderId: "485505090417" }; firebase.initializeApp(config); export default firebase
const webpack = require('webpack'); /* eslint-disable no-alert, no-console */ /* eslint-enable no-alert, no-console */ const eslint_config = { 'test': /\.js$/, 'include': /src/, 'exclude': /node_modules/, 'enforce': 'pre', 'use': { 'loader': 'eslint-loader', 'options': { 'fix': true, } } } module.exports = eslint_config;
import React from "react" import { Grid,Paper, Avatar, Box, Button } from "@material-ui/core" import LockOutlinedIcon from "@material-ui/icons/LockOutlined"; import hash from "object-hash" import * as yup from "yup" import { Formik, Field, Form, useField } from "formik" import { MyTextField } from "../Form" import { styles } from "../styles"; import { isLoggedIn, jwtToCookie, sender, timeToExpire} from "../../utils/utils" import { useHistory } from "react-router-dom" import { API } from "../../App" const schema = yup.object( { email: yup.string().email("Niepoprawny email").required("Email jest wymagany"), password: yup.string() .required("Nie wpisano hasła.") .min(8, "Hasło jest zbyt krótkie - powinno mieć conajmniej 8 znaków.") } ) export const Login = ({loginSetter}) => { let history = useHistory() const paperStyle = { padding: 40, height: "40vh", width: 330, margin: "30px auto", } const avatarStyle={backgroundColor:"#1bbd7e"} const btnstyle={margin:"8px 0"} return( <div> <Grid> <Paper elevation={10} style={{ ...paperStyle, ...styles.glassMorphism }}> <Grid align="center"> <Avatar style={avatarStyle}><LockOutlinedIcon/></Avatar> <h2>Zaloguj się</h2> </Grid> <Formik validationSchema={schema} initialValues={ { email: "", password: "" }} onSubmit={async (data, { setSubmitting, resetForm }) => { setSubmitting(true); data.password = hash(data.password) const [message, status] = await sender(API + "auth/login", data) console.log(message) if (status != 200) { alert(message) return } else jwtToCookie(message) const isLogged = isLoggedIn() loginSetter(isLogged) if (!isLogged) return history.push("/") setTimeout(() => { console.log("setting") loginSetter(false) }, timeToExpire()) console.log(timeToExpire()) console.log(data); setSubmitting(false); resetForm(); }} > {({ values, isSubmitting, errors }) => ( <Form> <Field name="email" placeholder="janKowalski@poczta.com" type="input" label="email" margin="normal" as={MyTextField} /> <Field name="password" placeholder="***********" type="password" label="hasło" margin="normal" as={MyTextField} /> <Button style={btnstyle} disabled={isSubmitting} type="submit">Zaloguj</Button> </Form> )} </Formik> </Paper> </Grid> </div> ) }
import React, { Component } from "react"; // import Radium, {StyleRoot} from 'radium'; import "./Person.css"; class Person extends Component { render() { console.log("[person.js] person only renders.....not persons"); return ( <div className="Person" style={this.style}> <p onClick={this.props.click}> I'm {this.props.name} and I am {this.props.age} Years Old </p> <p> {this.props.children} </p> <input type="text" onChange={this.props.changed} value={this.props.name} /> </div> ); } } export default Person;
$(document).ready( function() { //NAV MENU $("#about-link").click(function() { $(".section").hide(); $("#about").slideDown(); }); $("#lids-link").click(function() { $(".section").hide(); $("#lids").slideDown(); }); $("#teas-link").click(function() { $(".section").hide(); $("#teas").slideDown(); }); $("#contact-link").click(function() { $(".section").hide(); $("#contact").slideDown(); }); //SILDESHOW var currentImageIndex = 0; var numImages = $('.slider-img').length; var sliderfn = function(){ $(".slider-img").eq(currentImageIndex).fadeOut(800); $(".circle").eq(currentImageIndex).animate({opacity: 0.3}, 800); currentImageIndex = (currentImageIndex + 1) % numImages; $('.slider-img').eq(currentImageIndex).fadeIn(800); $(".circle").eq(currentImageIndex).animate({opacity: 0.7}, 800); }; var timer = setInterval(sliderfn, 5000); });
import React from 'react'; import style from './SelectDataComponent.module.css'; import SelectDataPdfPagination from './SelectDataPdfPaginationComponent.js'; import SelectDataPdfPage from '../containers/SelectDataPdfPage.js'; const SelectDataComponent = (props) => { let paginationComponent = null; let pageComponent = null; if(props.page !== null){ paginationComponent = (<SelectDataPdfPagination {...props} />); pageComponent = (<SelectDataPdfPage page={props.page} />); } return ( <div> {paginationComponent} {pageComponent} </div> ); }; export default SelectDataComponent;
var applet_width = 200; var applet_height = 200; var local_debug = "true"; step_list[step_list_n++] = 'index'; step_list[step_list_n++] = 'single'; step_list[step_list_n++] = 'multiple20'; step_list[step_list_n++] = 'multiple4'; function local_start(title, cls) { list_start(title, 'Jumpers', cls, "HalfCircles"); } function local_prev(refTxt, paragraph) { list_ref_prev(refTxt, paragraph); } function local_next(refTxt, paragraph) { list_ref_next(refTxt, paragraph); } function local_ref(txt, file) { wd(qs_ref(txt, file, txt)); } function local_java_ref(cls, txt) { return java_src_ref("theaterEx/jumpers/" + cls + ".java", txt); } function local_applet_plain(cls) { applet_plain('theaterEx', 'jumpers.' + cls, new Array(new Array("DEBUG", "false" ) ), undefined, undefined); } function local_applet_example(cls, title) { if (title != undefined) wd(qs_font_color() + title + "</font><BR>") ; applet_plain('theaterEx', 'jumpers.' + cls, new Array(new Array("DEBUG", "false" ) ), 'withSrc', 'restart'); } function local_indent() { list_indent(); } function local_unindent() { list_unindent(); } function local_row_spacer() { list_row_spacer(); } function local_applet_start(title) { if (title != undefined) wd("<p>" + qs_font_color() + title + "</font></p>") ; local_indent(); html(); } function local_applet_finish(cls, code, helper) { applet_with_code('theaterEx', 'jumpers.' + cls, new Array(new Array("DEBUG", "false" ) ), code, undefined, 'NoRestart'); if (helper != undefined) wd(local_java_ref(helper, 'JavaSource: ' + helper)); local_unindent(); html(); } function local_applet(cls, code, title, helper) { if (title != undefined) wd("<p>" + qs_font_color() + title + "</font></p>") ; local_indent(); applet_with_code('jumpers', cls, new Array(new Array("DEBUG", "false" ) ), code, undefined, 'NoRestart'); if (helper != undefined) wd(local_java_ref(helper, 'JavaSource: ' + helper)); local_unindent(); } function local_menu_ref(txt, menu, sub_menu) { return qs_ref_menu_item(txt, menu, sub_menu) } //alert("loaded local.js");
import React, { Component } from "react"; import Jumbotron from "../../components/Jumbotron"; import DeleteBtn from "../../components/DeleteBtn"; import Upload from "../../components/Upload" import API from "../../utils/API"; import { Link } from "react-router-dom"; import { Col, Row, Container } from "../../components/Grid"; import { List, ListItem } from "../../components/List"; import { Input, TextArea, FormBtn } from "../../components/Form"; import { FormGroup, ControlLabel, FormControl, Image } from 'react-bootstrap'; import pic from './perla.jpg'; import { Redirect } from 'react-router-dom'; import axios from "axios"; class Profile extends Component { constructor(props) { super(props) this.state = { user: this.props.user, select: null, bucket_desc: "", profile_desc: "", image_url: "", redirect: false, bucketList: [] } } componentDidMount() { console.log(this.state); axios.get('/auth/user').then(response => { console.log(response.data) if (!response.data.user) { this.setState({ redirect: true }, () => { console.log("redirecting...") }) } else { this.setState({ redirect: false, user: response.data.user }, () => { this.reloadProfileDesc(response.data.user._id) this.reloadListItems(response.data.user._id); }) } }) } deleteBook = id => { API.deleteItem(id) .then(res => this.reloadListItems(this.state.user._id)) .catch(err => console.log(err)); }; handleInputChange = event => { console.log(event.target) const { name, value } = event.target; console.log(name, value) this.setState({ [name]: value }, () => { console.log(this.state) }); }; get_img_url = (event) => { console.log(event) this.setState({ image_url: event }, () => { console.log(this.state) API.updateProfile( this.state.user._id, { image_url: this.state.image_url }) .then(res => this.reloadProfileDesc(this.state.user._id)) .catch(err => console.log(err)); }) } // handleFileSelect = evt => { // var f = evt.target.files[0]; // FileList object // var reader = new FileReader(); // // Closure to capture the file information. // reader.onload = (function (theFile) { // return function (e) { // var binaryData = e.target.result; // //Converting Binary Data to base 64 // var base64String = window.btoa(binaryData); // console.log("im on 77"); // this.setState({ image_url: base64String }) // //showing file converted to base64 // API.saveImage( // this.state.user._id, // { profileImage: base64String }) // .then(res => this.reloadProfileImage(this.state.user._id)) // .catch(err => console.log(err)); // }; // }); // }; handleFormSubmit = event => { event.preventDefault(); if (this.state.select && this.state.bucket_desc && this.state.user) { // console.log({ // itemVerb: this.state.select, // itemFreeText: this.state.bucket_desc, // itemAuthor: this.state.user._id // }) API.createItem({ itemVerb: this.state.select, itemFreeText: this.state.bucket_desc, itemAuthor: this.state.user._id }).then(res => this.reloadListItems(this.state.user._id)).catch(err => console.log(err)) } }; handleProfileUpdate = event => { event.preventDefault(); if (this.state.profile_desc && this.state.user._id) { API.updateProfile( this.state.user._id, { profileDescription: this.state.profile_desc }) .then(res => this.reloadProfileDesc(this.state.user._id)) .catch(err => console.log(err)); } }; reloadListItems = (id) => { // console.log(id) API.getListItems(id) .then(res => { // console.log("here is the res inside getListItems: " + res.data.itemFreeText); this.setState({ bucketList: res.data }); // console.log("Here's the bucket list! " + this.state.bucketList) }) .catch(err => console.log(err)); }; reloadProfileDesc = (profileId) => { API.getProfileDesc(profileId) .then(res => { console.log(res.data) this.setState({ profile_desc: res.data.profileDescription, image_url: res.data.image_url }, () => { console.log(this.state) }) }) .catch(err => console.log(err)); }; reloadProfileImage = (profileId) => { API.getProfileImage(profileId) .then(res => this.setState({ profile_desc: res.data.profileImage }) ) .catch(err => console.log(err)); }; render() { if (this.state.redirect) { return <Redirect to={{ pathname: '/login' }} /> } return ( <Container fluid> <Row> {/* <Col size="md-12"> */} {/* <Image src={`data:image/jpeg;base64,${this.state.image_url}`} thumbnail /> */} {/* <input type="file" id="files" name="files" /> <br /> <textarea id="base64" rows="5"></textarea> */} {/* </Col> */} <Col size="md-4"></Col> <Col size="md-4"> {/* <form onSubmit={this.handleFileSelect}> <label>Upload File:</label> <input type="file" name="input" /> <button type="submit">Upload</button> </form> */} <Upload get_img_url={this.get_img_url} img_prop = {this.state.image_url} /> <form> <TextArea value={this.state.profile_desc} onChange={this.handleInputChange} name="profile_desc" placeholder="Profile Description" /> <FormBtn disabled={!(this.state.profile_desc && this.state.user)} onClick={this.handleProfileUpdate} > Update Profile </FormBtn> </form> </Col> <Col size="md-3"> </Col> </Row> <Row> <Col size="md-6"> <h2>Adding Bucket List Items</h2> <form> <FormGroup controlId="formControlsSelect"> <ControlLabel>Select</ControlLabel> <FormControl name="select" componentClass="select" onChange={this.handleInputChange} > <option value="select"></option> <option value="Go to">Go to</option> <option value="See">See</option> <option value="Eat">Eat</option> <option value="Do">Do</option> <option value="Learn">Learn</option> <option value="Own">Own</option> <option value="Meet">Meet</option> </FormControl> </FormGroup> <TextArea value={this.state.bucket_desc} onChange={this.handleInputChange} name="bucket_desc" placeholder="Bucket List Detail" /> <FormBtn disabled={!(this.state.bucket_desc && this.state.select)} onClick={this.handleFormSubmit} > Submit item </FormBtn> </form> </Col> <Col size="md-6 sm-12"> <h2>Bucket List Items:</h2> {this.state.bucketList.length ? ( <List> {console.log(this.state.bucketList)} {this.state.bucketList.map(item => ( // <strong> {console.log(this.state)} </strong> <ListItem key={item._id}> <strong> {item.itemVerb}: {item.itemFreeText} </strong> <DeleteBtn onClick={() => this.deleteBook(item._id)} /> </ListItem> ))} </List> ) : ( <h3>No Results to Display</h3> )} </Col> </Row> </Container> ); } } export default Profile;
"use strict"; exports.getWindowByElement = getWindowByElement; exports.getElementOffset = getElementOffset; var _type = require("../../../../core/utils/type"); function getWindowByElement(element) { return (0, _type.isWindow)(element) ? element : element.defaultView; } function getElementOffset(element) { if (!element) return { left: 0, top: 0 }; if (!element.getClientRects().length) { return { top: 0, left: 0 }; } var rect = element.getBoundingClientRect(); var window = getWindowByElement(element.ownerDocument); var docElem = element.ownerDocument.documentElement; return { top: rect.top + window.pageYOffset - docElem.clientTop, left: rect.left + window.pageXOffset - docElem.clientLeft }; }
define([], function () { 'use strict'; var Descriptor = function(info){ info = _.defaults(info|| {}, { type:"PRIMITIVE" }) _.extend(this, info); }; _.extend(Descriptor.prototype, { clear: function(){ for(var key in this){ if (key !== 'clear') { this[key] = null; } } }, isPrimitiveDescriptor: function(path){ return this.type == "PRIMITIVE"; }, isModelDescriptor: function(path){ return this.type == "MODEL"; }, isCollectionDescriptor: function(path){ return this.type == "COLLECTION"; }, isValidable: function(){ return true; } }); return Descriptor; });
module.exports = { hooks: { 'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS', 'pre-push': 'yarn run tsc && yarn run test-core', }, };
// This is a manifest file that'll be compiled into application.js, which will include all the files // listed below. // // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. // // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the // the compiled file. // // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD // GO AFTER THE REQUIRES BELOW. // //= require jquery //= require jquery_ujs //= require bootstrap //= require bootstrap-modal // Removed // require_tree . $(function(){ $("#item_text").focus(function(){ $("#new_item .full-controls").css({'display' : ''}); }); $("#new_item").submit(function(){ if ( !$("#item_text").val() ) { return false; } else if ( !$("#item_tag_list_input input[type=checkbox]").is(":checked") ) { alert("Assign at least one tag."); return false; } else if ( !$("#item_listeners_input input[type=checkbox]").is(":checked") ) { var resp = confirm("You haven't shared this item with anyone. Do you want to continue to simply save it for future use?"); return resp; } }); // Not blurring works actually $("#new_item").focusout(function(){ // Disable return; if ( !$(this).val() ) { $("#new_item .full-controls").css({'display' : 'none'}); } }); if ( !localStorage["bookmarklet-install-hide"] ) { $(".bookmarklet-install").css({ display : "" }); } $("#bookmarklet").on("click", function(){ localStorage["bookmarklet-install-hide"] = true; return false; }); $("#bookmarklet").on("mousedown", function(){ localStorage["bookmarklet-install-hide"] = true; }); $(".bookmarklet-install .close").click(function(){ $(".bookmarklet-install").css({ display : "none" }); localStorage["bookmarklet-install-hide"] = true; }); if( $("#new_item #item_listeners_input .choices-group").find("li").length == 0) { $("#new_item #item_listeners_input .choices-group").html("<i>You are not assigned as a wingman to anyone. Still save them for later use.</i>"); } $(function(){ $("#" + window.nav_id).parents("li").toggleClass("active"); }); $(".choice input.tag_input").each(function(){ var $this = $(this); if ( $this.is(':checked') ) { $this.parents("li").toggleClass("selected"); // css({ "background-color" : "White", "border-style" : "dotted" }); } else { //$this.parents("li").toggleClass("selected"); //$this.parents("li").css({ "background-color" : "White", "border-style" : "dotted" }); } }); $(".choice").on("click", "input.tag_input", function(){ var $this = $(this); $this.parents("li").toggleClass("selected"); }); $(".btn-wingman-request").click(function(e){ var message = prompt("Write short message on how you need help?"); if (!message) { return false; } $(this).attr("href", $(this).attr("href") + "&message=" + encodeURIComponent(message) ); //e.preventDefault(); //return false; }); $(".comment-new").find("form").submit(function(){ if ( !$(this).find("#comment_comment").val() ) { return false; } }); $(".comment-new").live("keyup", function(e){ if ( e.which == 13 ) { (function(elem){ setTimeout( function(){ elem.val(""); elem.blur(); }, 10); })($(e.target)); var $this = $(this); var commentable_id = $this.parents(".comments").data("commentable-id"); var commentable_type = $this.parents(".comments").data("commentable-type"); //$.() //alert( $this.parents(".comments").data("commentable-id") ); } }); }); function getRandomId(range) { return Math.floor(Math.random()*( range || 9999999999 )) }
import React, { Component } from 'react'; import { Table } from 'antd'; import '../index1.css'; import '../AudioBooks/AudioBooks.css'; import './tables.css'; import { TreeSelect, Input, Typography } from 'antd'; import MediaQuery from 'react-responsive'; const visible = false; const Loading = false; // const Value1 = ''; // const Value2 = ''; const { Search } = Input; const { TreeNode } = TreeSelect; const { Text } = Typography; export default class RequestedTable extends Component { onChange1=(value)=>{ this.setState({Value1: value}) } onChange2=(value)=>{ this.setState({Value2: value}) } handleSearch=()=>{ } handleChange = (event) => { this.setState({checked: true}) }; onCheckChange(e) { console.log(`checked = ${e.target.checked}`); } showModal = () => { this.setState({ visible: true, }); }; handleOk = e => { console.log(e); this.setState({ visible: false, }); }; handleCancel = e => { console.log(e); this.setState({ visible: false, }); }; constructor(){ super(); this.state = visible; this.onChange = this.onChange.bind(this); this.handleChange = this.handleChange(this); // this.onSubmit = this.onSubmit.bind(this); } // onChange(e){ // this.setState({[e.target.name]: e.target.value}); // } // onSubmit(e){ // e.preventDefault(); // }; // } onChange(filters, sorter, extra) { console.log('params', filters, sorter, extra); } render() { const columns = [ { title: <p className = "ReviewsTableTitle">Cover Image</p>, dataIndex: "coverImage", key: 'coverImage', // filters: [ // { // text: 'Joe', // value: 'Joe', // }, // { // text: 'Jim', // value: 'Jim', // }, // { // text: 'Submenu', // value: 'Submenu', // children: [ // { // text: 'Green', // value: 'Green', // }, // { // text: 'Black', // value: 'Black', // }, // ], // }, // ], // specify the condition of filtering result // here is that finding the name started with `value` onFilter: (value, record) => record.name.indexOf(value) === 0, // sorter: (a, b) => a.name.length - b.name.length, // sortDirections: ['descend'], }, { title: <p className = "ReviewsTableTitle">Audiobook Name</p>, dataIndex: "audioBookName", key: "audioBookName", defaultSortOrder: 'descend', sorter: (a, b) => a.age - b.age, }, { title: <p className = "ReviewsTableTitle">Region</p>, dataIndex: "region", key: "region", // filters: [ // { // text: 'London', // value: 'London', // }, // { // text: 'New York', // value: 'New York', // }, // ], // filterMultiple: false, onFilter: (value, record) => record.address.indexOf(value) === 0, sorter: (a, b) => a.address.length - b.address.length, sortDirections: ['descend', 'ascend'], }, { title: <p className = "ReviewsTableTitle">Author</p>, dataIndex: "author", key: "author", // filters: [ // { // text: 'London', // value: 'London', // }, // { // text: 'New York', // value: 'New York', // }, // ], // filterMultiple: false, // onFilter: (value, record) => record.address.indexOf(value) === 0, // sorter: (a, b) => a.address.length - b.address.length, // sortDirections: ['descend', 'ascend'], }, { title: <p className = "ReviewsTableTitle">Days Remaining</p>, dataIndex: "daysRemaining", key: "daysRemaining", // filters: [ // { // text: 'London', // value: 'London', // }, // { // text: 'New York', // value: 'New York', // }, // ], filterMultiple: false, onFilter: (value, record) => record.address.indexOf(value) === 0, sorter: (a, b) => a.address.length - b.address.length, sortDirections: ['descend', 'ascend'], }, { title: <p className = "ReviewsTableTitle">Promo Code</p>, dataIndex: "promoCode", key: "promoCode", // filters: [ // { // text: 'London', // value: 'London', // }, // { // text: 'New York', // value: 'New York', // }, // ], filterMultiple: false, onFilter: (value, record) => record.address.indexOf(value) === 0, sorter: (a, b) => a.address.length - b.address.length, sortDirections: ['descend', 'ascend'], }, { title: <p className = "ReviewsTableTitle">Status</p>, dataIndex: "status", key: "status", // filters: [ // { // text: 'London', // value: 'London', // }, // { // text: 'New York', // value: 'New York', // }, // ], filterMultiple: false, onFilter: (value, record) => record.address.indexOf(value) === 0, // sorter: (a, b) => a.address.length - b.address.length, sortDirections: ['descend', 'ascend'], }, { title: <p className = "ReviewsTableTitle">Date</p>, dataIndex: "date", key: "date", // filters: [ // { // text: 'London', // value: 'London', // }, // { // text: 'New York', // value: 'New York', // }, // ], filterMultiple: false, onFilter: (value, record) => record.address.indexOf(value) === 0, sorter: (a, b) => a.address.length - b.address.length, sortDirections: ['descend', 'ascend'], }, ]; const data = [ { key: "coverImage", coverImage: <img src = {require("../../../Assets/Images/b1.png")} style = {{maxHeight: "80px", maxWidth: "80px"}} alt = "table"/> , audioBookName: <p className = "AudioBookName">Harry Potter</p>, region: <p className = "ReviewsTableData">US</p>, author: <p className = "ReviewsTableData"><u>Jackson Barber</u></p>, daysRemaining: <p className = "ReviewsTableData">29</p>, promoCode: <p className = "ReviewsTableData">327KQXCGGDNG7</p>, status: <p className = "ReviewsTableData">PENDING CONFIRMATION</p>, date: <p className = "ReviewsTableData">08-04-2020</p> }, ]; return ( <div> <br/> <br/> <div style = {{display: "flex", justifyContent: "space-between", marginBottom: "15px"}}> <div style = {{marginTop: "-60px"}}> <br/> <MediaQuery minDeviceWidth = {550}> <Text style = {{fontFamily: "Futura-Medium-01", fontStyle: "normal", fontWeight: "bold", fontSize: "13px", lineHeight: "16px", letterSpacing: "1.079px", textTransform: "uppercase", color: "#000000", marginLeft: "-20px"}}>Show</Text> </MediaQuery> <MediaQuery maxDeviceWidth = {549}> <Text style = {{fontFamily: "Futura-Medium-01", fontStyle: "normal", fontWeight: "bold", fontSize: "13px", lineHeight: "16px", letterSpacing: "1.079px", textTransform: "uppercase", color: "#000000"}}>Show</Text> </MediaQuery> <TreeSelect defaultSortOrder= 'descend' sorter= {(a, b) => a.age - b.age} showSearch style={{ width: '300%'}} value={this.state.Value1} dropdownStyle={{ maxHeight: 400, overflow: 'auto' }} allowClear treeDefaultExpandAll onChange={this.onChange1} > <TreeNode value="20" title="20" /> <TreeNode value="30" title="30" /> <TreeNode value="40" title="40" /> </TreeSelect> </div> <div style = {{marginTop: "-60px"}}> <br/> <MediaQuery minDeviceWidth = {550}> <Text style = {{fontFamily: "Futura-Medium-01", fontStyle: "normal", fontWeight: "bold", fontSize: "13px", lineHeight: "16px", letterSpacing: "1.079px", textTransform: "uppercase", color: "#000000", marginLeft: "-20px"}}>Status</Text> </MediaQuery> <MediaQuery maxDeviceWidth = {549}> <Text style = {{fontFamily: "Futura-Medium-01", fontStyle: "normal", fontWeight: "bold", fontSize: "13px", lineHeight: "16px", letterSpacing: "1.079px", textTransform: "uppercase", color: "#000000"}}>Status</Text> </MediaQuery> <TreeSelect defaultSortOrder= 'descend' sorter= {(a, b) => a.age - b.age} showSearch style={{ width: '300%'}} value={this.state.Value1} dropdownStyle={{ maxHeight: 400, overflow: 'auto' }} allowClear treeDefaultExpandAll onChange={this.onChange1} > <TreeNode value="20" title="20" /> <TreeNode value="30" title="30" /> <TreeNode value="40" title="40" /> </TreeSelect> </div> <div style = {{marginTop: "-35px"}}> <Text style = {{fontFamily: "Futura-Medium-01", fontStyle: "normal", fontWeight: "bold", fontSize: "13px", lineHeight: "16px", letterSpacing: "1.079px", textTransform: "uppercase", color: "#000000"}}>SEARCH</Text> <Search placeholder="Search" loading={Loading} style={{ width: '100%'}} onChange={this.handleSearch}/> </div> </div> <Table columns={columns} dataSource={data} onChange={this.onChange} pagination = {false}/> </div> ) } } ;
// @flow import { type Action } from "shared/types/ReducerAction"; import { type AsyncStatusType, type NotificationType, } from "shared/types/General"; import { ASYNC_STATUS } from "constants/async"; import { ASYNC_SCHEDULE_INIT, INITIALIZE_SCHEDULE, HANDLE_NOTIFICATION, GET_SCHEDULE_SUCCESS, ON_CHANGE_SCENE_NUMBER, } from "actionTypes/schedule"; export type ScheduleStateType = { notification: NotificationType, status: AsyncStatusType, schedule: Array<any>, }; const initialState: ScheduleStateType = { status: ASYNC_STATUS.INIT, notification: null, schedule: [], }; function asyncScheduleInit(state: ScheduleStateType) { return { ...state, notification: null, status: ASYNC_STATUS.LOADING, }; } function initializeSchedule(state: ScheduleStateType) { return { ...state, notification: null, status: ASYNC_STATUS.INIT, scripts: [], }; } function handleNotification( state: ScheduleStateType, { isSuccess, notification } ) { return { ...state, notification, status: isSuccess ? ASYNC_STATUS.SUCCESS : ASYNC_STATUS.FAILURE, }; } function onChangeSceneNumber(state: ScheduleStateType, { scene, date }) { let updatedSchedule = state.schedule; updatedSchedule = updatedSchedule.map((schedule) => { if (schedule.sceneNumber === scene) { return { ...schedule, fixedDate: date, }; } return schedule; }); return { ...state, schedule: updatedSchedule, }; } export default ( state: ScheduleStateType = initialState, { type, payload = {} }: Action ) => { switch (type) { case ASYNC_SCHEDULE_INIT: return asyncScheduleInit(state); case INITIALIZE_SCHEDULE: return initializeSchedule(state); case HANDLE_NOTIFICATION: return handleNotification(state, payload); case GET_SCHEDULE_SUCCESS: return { ...state, schedule: payload.map((item) => { return { ...item, fixedDate: "", }; }), status: ASYNC_STATUS.SUCCESS, }; case ON_CHANGE_SCENE_NUMBER: return onChangeSceneNumber(state, payload); default: return state; } };
const pusheen = (map, x, y) => { var personaje = hero(map, x, y); personaje.name("nada"); personaje.voice("Google italiano"); personaje.say(); return Object.assign({}, personaje,{ }); }; pusheen.image = 'characters/pusheen/pusheen.png';
import styled from "styled-components"; export const LoadingOverlayContainer = styled.div` height: 100%; width: 100%; position: absolute; top: 0; left: 0; display: flex; justify-content: center; z-index: 9999; background-color: rgba(216, 147, 162, 0.35); div { align-self: center; } `;
$(function (){ var url = "ws://localhost:8080/websocketserver/WebSocketServer"; $('#submitMessage').on('click', function() { var str = $('input:text[name="main_box"]').val(); console.log(str); if(!(str == "")){ var ws = new WebSocket(url); ws.onmessage = function(receive) { $("#message").text(receive.data); }; ws.onopen = function () { ws.send(str); console.log("sended message"); }; }else console.log("aa"); }); });
angular.module("app.home").controller("HomeController", function ($scope, $location, UserService) { $scope.hasError = false; $scope.user = { name: "" }; $scope.startGame = function (loginForm) { if (loginForm.username.$valid) { UserService.setUserName($scope.user.name); $location.path("/game"); } else { $scope.hasError = true; } }; });
/** * Created by Preet on 8/22/2015. */ var connect = require('connect'); var serveStatic = require('serve-static'); connect().use(serveStatic(__dirname)).listen(8080); console.log("director name is " + __dirname);
import React , {Component} from 'react'; import 'bulma/css/bulma.css' import './App.css'; //import {FilmInfo} from './componentes/peliculainfo.js' import {Home} from './paginas/home.js' import {PeliculaDetalle} from './paginas/peliculadetalle.js' import {NotFound} from './paginas/notfound.js' import {Switch} from 'react-router-dom' // sirve para envolver rutas. Solo rendizara la primera ruta que satisfaga la regla definida en el path import {Route} from 'react-router-dom' // nos permitira indicar las rutas de forma declarativa class App extends Component { //crearemos una prop onResults en el componente BuscadorFormulario, que sera la que pase el array de pelicula //Dentro del componente Switch tenemos que especificar las rutas de nuestro componente //Para cada una utilizamos el componente "Route" //la 1º se debe satisfacer de forma exacta para entrar. El path a resolver es la raiz principal y el componente a cargar "Home" //la 2º (ruta del detalle). le decimos que tendra un parametro "id", que sera la id de la pelicula. Cargara componente "PeliculaDetalle" render() { return ( <div className="App"> <Switch> <Route exact path ='/' component = {Home} /> <Route path = '/detail/:peliculaId' component={PeliculaDetalle}/> <Route component = {NotFound} /> </Switch> </div> ); } } export default App; // **************** creo un componente reusable que lista y muestra un array de peliculas**********// // dejo comentado este metodo /* listadopeliculas(){ //volcamos datos array results const {results} = this.state //prueba listado datos correctos // return results.map( pelicula => <p key = {pelicula.imdbID} >{pelicula.Title}</p>) } return results.map( pelicula => { return( <FilmInfo key = {pelicula.imdbID} title = {pelicula.Title} year = {pelicula.Year} poster = {pelicula.Poster}/> ) }) } ************************************************************************************** */ /* REFACTORIZAMOS EL CODIGO. CREO COMPONENTE "HOME" QUE RENDERIZA EL BUSCADOR //Añadimos un state que le vamos a llamar results y lo inicializamos con un ARRAY vacio. //en este state volcaremos los datos de la consulta state = { busqueda: false, results: []} // la definimos como ARROW FUNCTION, ya que accedemos al contexto THIS, para enlazar el contextop correcto //En este metodo tambien actualizamos el valor de "busqueda", ya que este metodo se ejecuta cada vez que usuario realiza una busqueda handleResults = (results) => { this.setState({results, busqueda : true}) } renderResults(){ console.log('resultados',this.state.results) return ( this.state.results.length === 0 ?<div> <br></br> <p> Sorry, try something different...</p> </div> :<Listapeliculas listapeliculas = {this.state.results}/> // ya no usamos el metodo this.listadopeliculas(). Sino que llamamos al componente listapeliculas ) } ************************************************** /* const url = new URL(document.location) const Page = url.searchParams.has('id') ? <PeliculaDetalle id = {url.searchParams.get('id')}/> : <Home/> ********************************************** <Title>BUSCADOR DE PELICULAS</Title> <div className = 'SearchForm-wrapper'> <BuscadorFormulario onResults={this.handleResults} /> </div> { this.state.busqueda ? this.renderResults() : <div> <br></br> <h6> You can search Movies, Series or Videogames </h6> </div> } <br></br> <p>I use <a href="https://www.omdbapi.com/" target="_blank" rel="noopener noreferrer">OMDB API</a> for results</p> */