text
stringlengths
7
3.69M
$(function() { $('#featured').cycle({ fx: 'scrollLeft', speed: 700, timeout: 5000 }); }); function initialize() { var mapProp = { center: new google.maps.LatLng(44.563826, -123.279120), zoom:14, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById(...
"use strict"; function display_creator() { document.getElementById("create_user").style.display = "block"; } function hide_creator() { document.getElementById("create_user").style.display = "none"; }
var backgroundElements = "div#tips,.thumb .label,.post-labels a,.copyright-inner,.tr-caption,.popular-post-item .item .item_content .item_labels a,#header-navigation,#header-search,#header-search input,#myBar,.popular-post-list .item_labels li a", colorElements = "div#bang-thong-tin,.post-body h2,.post-body h3,.pos...
'use strict'; var guestApp = angular.module('guestApp',[]); guestApp.controller('GuestController', [ '$scope', GuestController]); var NAME_REGEXP = /^[А-Я]{1}[а-я]{2,}\.[А-Я]{1}[а-я]{2,}$/; guestApp.directive('russianName', function() { return { require: 'ngModel', link: function(scope, elm, attrs, ctrl) { ...
import React, { Component } from 'react' import CategoryLink from './category-link' import categories from './categories_edited.json' export default class PopularCategories extends Component { render () { return ( <div className="card category-container"> <span className="heading is-size-6"> Popula...
var debug = require('debug')('cavern:router') var express = require('express') var bodyParser = require('body-parser') var _ = require('lodash') var uuid = require('uuid') module.exports = function (config) { var root_vault = require('node-vault')({ endpoint: config.vault_endpoint, token: config.vault_token ...
 var CurrentRow; function LoadGridApplication() { $("#gridCountry").kendoGrid({ selectable: "multiple", scrollable: false, navigatable: true, change: function (e) { grid = e.sender; CurrentRow = grid.dataItem(this.select()); }, dataBinding: ...
// place to hold all of our types. organization purpose. export const GET_PROGRAMS = "GET_PROGRAMS"; export const DELETE_PROGRAM = "DELETE_PROGRAM"; export const ADD_PROGRAM = "ADD_PROGRAM"; export const GET_ERRORS = "GET_ERRORS"; export const CREATE_MESSAGE = "CREATE_MESSAGE"; export const USER_LOADING = "USER_LOADING...
import React, { useEffect } from 'react'; import { Switch, Route } from 'react-router-dom'; import { actions, fetchHostDataAction } from '../redux/actions'; import { connect } from 'react-redux'; import Home from '../routes/Home'; import MainHeader from './Header'; import STATUS from '../Constants'; import { Skeleton }...
class EnemySpawner extends Phaser.Group { constructor(game, parent) { super(game, parent); } } export default EnemySpawner;
var class_otter_1_1_debug_command = [ [ "RegisterTypes", "class_otter_1_1_debug_command.html#a003cba71de7fc245f30b6400a9bd63cc", null ], [ "argumentTypes", "class_otter_1_1_debug_command.html#ac9985995c39f79884cca55d9e173e532", null ], [ "ArgumentCount", "class_otter_1_1_debug_command.html#a67e22f5b6dcbf7a1...
let gulp = require('gulp'), less = require('gulp-less'), util = require('gulp-util'), rename = require('gulp-rename'), browserify = require('browserify'), babelify = require('babelify'), watchify = require('watchify'), uglifyify = require('uglifyify'), buffer = require('vinyl-buffer'), source = requir...
const router = require('express').Router(); const jwt = require('jsonwebtoken') const picture = require('../controllers/nasaPicture') router.use((req, res, next) => { console.log("gili" + req.headers['authorization']) const verify = jwt.verify(req.headers['authorization'], process.env.SECRET); req.headers...
import React from 'react'; import { connect } from 'react-redux'; import { Container } from 'react-bootstrap'; import { setMenu } from '../../actions/menu'; // Custom Styling import StyledButton from '../common/Button/StyledButton'; import StyledTitle from '../common/Title/StyledTitle'; const MenuChoice = (props) =>...
// tag.js Page({ /** * 页面的初始数据 */ data: { inputUserId: null, historyTags: [], tagIndex: 0, showTagGuide: false }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { try { var value = wx.getStorageSync('clashroyale.userId') if (value) { console.log(value...
let createLi=document.createElement('li') createLi.innerText='Five' createLi.className='hiFive' createLi.setAttribute('name','thisFive') // console.log(createLi) let selectUl=document.getElementById('ul') selectUl.appendChild(createLi) //-----------Make function for this------------ function customCreateElement(tagNam...
const NodeEnvironment = require('jest-environment-node'); module.exports = class MiniProgramEnvironment extends NodeEnvironment { constructor(config) { super(Object.assign({}, config, { globals: Object.assign({}, config.globals, { Uint32Array: Uint32Array, Uint8Array: Uint8Array, Ar...
import React, { Component } from 'react'; import { Container, Row, Col } from 'reactstrap'; import Link from 'next/link'; import { bindActionCreators } from 'redux'; import withRedux from 'next-redux-wrapper'; import initStore from '../store'; import Input from '../components/input'; import Radio from '../components/ra...
import React from "react" import ReactPlayer from "react-player/lazy" import Section from "@atoms/Section" import heroVidwebm from "@assets/videos/room.webm" import heroVidmp4 from "@assets/videos/room.mp4" import styled, { useColorMode, x } from "@xstyled/styled-components" import { StaticImage } from "gatsby-plugin-i...
var relacaoFilmes = ["https://m.media-amazon.com/images/M/MV5BMTMyMTE3OTk3NF5BMl5BanBnXkFtZTcwOTkwNDc3NA@@._V1_UX182_CR0,0,182,268_AL_.jpg", "https://m.media-amazon.com/images/M/MV5BOTNlZTkxOGUtMmI0MC00MzVjLWE4NzQtNjRjMzNjMzRmMWUyXkEyXkFqcGdeQXVyMTkzODUwNzk@._V1_UX182_CR0,0,182,268_AL_.jpg", "https://m.media-amazon.com...
// 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 pat...
var myApp = angular.module('myApp', []); myApp.controller('WelcomeController', ['$scope', '$http', function($scope, $http){ $scope.note = {}; $scope.nameArray=[]; //POST $scope.clickButton = function(note){ $http.post('/post/data', note).then(function(response){ $scope.getPeople(); ...
const regeneratorRuntime = require('../../../lib/regenerator-runtime') const upyunUpload = require('../../../lib/upyun-upload') const { claimGroup, getGroup, updateGroup } = require('../../../api/group') const { navigateErrorPage, alertError, alert, pushLog } = require('../../../utils') Page({ data: { view: '',...
import { connect } from 'react-redux'; import Login from '../components/Login/Login'; import { fetchUserSignUp, fetchUserLogin } from '../actions' const mapStateToProps = (state) => { return { user: state.user, loading: state.userLoading } } const mapDispatchToProps = (dispatch) => { return { fetchU...
import React, {Component} from "react"; import PropTypes from 'prop-types'; class ListItem extends Component { render() { const{fullName, image, age, city}=this.props; return ( <div className="person"> <h2 className="person__name">{fullName}</h2> <img src={image} alt={fullName}/> <di...
export {fadeIn} from './fadeIn'; export {fadeOut} from './fadeOut'; export {slideTo} from './slideTo'; export {slideFrom} from './slideFrom'; export {listSplit} from './listSplit'; export {moveToNextSlide} from './moveToNextSlide'; export {morphTo} from './morphTo'; export {menuPulse} from './menuPulse';
const mongoose = require('mongoose'); const MongoClient = require('mongodb').MongoClient; const url = 'mongodb://localhost'; const dbName = 'amenities'; const randomInt = function randomInt(min, max){ return Math.floor(Math.random() * (max - min + 1)) + min; //The maximum is inclusive and the minimum is inclusive ...
require("console-polyfill"); import axios from "axios"; import SysModal from 'components/sysModal'; import message from "sub-antd/lib/message"; // 状态码错误信息 const codeMessage = { 200: "服务器成功返回请求的数据。", 201: "新建或修改数据成功。", 202: "一个请求已经进入后台排队(异步任务)。", 204: "删除数据成功。", 400: "发出的请求有错误,服务器没有进行新建或修改数据的操作。", ...
"use strict"; const handler = { get: (obj, prop) => { if (typeof(prop) != 'string') { return; } return(...args) => ((prop + '(' + args.map(v => JSON.stringify(v)).join(',') + ')')); } } const evalbuilder = new Proxy({}, handler); module.exports = evalbuilder;
angular.module('boosted') .directive('navBar', function() { return { restrict: 'E', templateUrl: 'public/app/directives/navBar/navBar.html', controller: function($scope, service){ service.getUser().then(function(response) { if (!respon...
import React, { Component } from "react"; import styled from "styled-components"; import { withFirebase } from "../Firebase"; import { withAuthorization } from "../Session"; import renderIf from "render-if"; const MainDiv = styled.div` padding: 2em; display: flex; flex-flow: column; align-items: center; just...
const express = require("express"); const nodemailer = require("nodemailer"); const router = express.Router(); // Conexión a la Base de Datos const connection = require("../database/db"); router.get("/home", (req, res)=>{ res.render("home") }); // Select // router.get("/admin", (req, res)=>{ // let sql = ...
import React, { Component } from 'react'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { ListGroupItem, Button, ButtonToolbar } from 'react-bootstrap'; import { Link } from 'react-router-dom'; import { deletePost } from '../actions/posts';...
/** * Created by xiaojiu on 2016/11/7. */ define(['../../../app','../../../services/storage/inventory-manage/inventoryDetailsService'], function (app) { var app = angular.module('app'); app.controller('inventoryDetailsCtrl', ['$rootScope','$scope', '$sce', '$timeout', 'inventoryDetails','$window','$statePara...
import mongoose from 'mongoose'; import jwt from 'jsonwebtoken'; const userSchema = new mongoose.Schema({ _id: { type: String, unique: true, required: false, }, name: { type: String, unique: false, required: true, }, studentID: { type: Number, unique: true, required: true,...
var client_id = "s7vcz8pfgw4tlc3a873qwxmozuviklo"; var chaine = "firepandaa?client_id=" + client_id; var title = "Firepandaa"; var url_api_statut = "https://api.twitch.tv/kraken/streams/"+chaine var url_api_title = "https://api.twitch.tv/kraken/channels/"+chaine var message = title + " est en ligne !"; var redir...
// Task // Finish the function numberToOrdinal, which should take a number and return it as a string with the correct ordinal indicator suffix (in English). For example, 1 turns into "1st". // For the purposes of this challenge, you may assume that the function will always be passed a non-negative integer. If the func...
import treeTable from './TreeTable.vue'; import pagination from './Pagination.vue'; import search from './Search.vue'; function plugin(Vue) { if (plugin.installed){ return; } Vue.component("CommonTreeTable",treeTable); Vue.component("CommonPagination",pagination); Vue.component("CommonSearch",search); } ...
import React, { Component } from 'react'; import { StyleSheet, Text, View, TextInput, ScrollView, TouchableOpacity, KeyboardAvoidingView, Alert } from 'react-native'; import { StackNavigator, NavigationActions } from 'react-navigation'; import DataBase from './DataBase'; import Note from './Note'; import Create...
define('app/util/popover/popover', [ 'jquery', 'underscore', 'magix', 'app/exts/popover/popover' ], function($, _, Magix, Popover) { return { showPopover: function (options, viewName, viewOptions) { var popoverId = 'popover' options = _.extend({ content: '<div id="' + popoverId + '"><...
// Tell linter that jQuery $ & Stripe are defined globally /* global $, Stripe */ // jQuery Document Ready $(document).on('turbolinks:load', function() { // Select form & submit button var proForm = $('#pro_form'); var submitBtn = $('#form-submit-btn'); // Set Stripe public key Stripe.setPublishableKey...
function DBHandler(aOption) { var self = this; this.databaseOption = aOption; this.database = null; this.name = 'DBHandler'; DBHandler.prototype.connectDB = function(){ try{ self.database = openDatabase( self.databaseOption.fileName, self.databaseOption.version, self.databas...
const mongoose = require('mongoose'); const bcrypt = require('bcrypt'); const Schema = mongoose.Schema; const OwnProjectSchema = new Schema({ id: { type: Schema.Types.ObjectId, required: true }, }, { _id: false, }); const UserSchema = new Schema({ name: { type: String, required: true, unique: true }, password...
import styled from 'styled-components' const FeatureTitle = styled.h3` `; export default FeatureTitle;
import React,{useEffect,useState} from 'react' import styled from 'styled-components' import image from '../../source/church4.jpg' import Postform from './Postform'; import PostList from './PostList'; import Loader from 'react-loader-spinner'; import { connect } from 'react-redux'; import { createStructuredSelector ...
const path = require("path"); const resolve = require("path").resolve; const Dotenv = require('dotenv-webpack'); const autoprefixer = require('autoprefixer'); const {CleanWebpackPlugin} = require("clean-webpack-plugin"); const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const HtmlWebpackPlugin = require(...
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _backbone = require('backbone'); var _backbone2 = _interopRequireDefault(_backbone); var _underscore = require('underscore'); var _underscore2 = _inter...
var getPerms = require('../04_get_perms').getPerms; var expect = require('chai').expect; describe('Recursion', function() { describe('Permutation of a string', function() { describe('empty string', function() { it('should output: [ "" ]', function() { expect(getPerms("")).to.deep.eq([""]); })...
function initPage(rootUrl){ jQuery("#suppliertable").dataTable({ "iDisplayLength": 10, //默认显示数据条数 "aLengthMenu": [5,10,25,50,100], "sPaginationType": "full_numbers", "aaSorting": [[0,'asc']],// 第一列升序排列 "oLanguage": { "sProcessing": "正在加载数据...", 'sSearch': '筛选:', "sLengthMenu": "显示 _MENU_ ...
import { Meteor } from 'meteor/meteor'; // Generate user credits after Facebook login Accounts.onCreateUser((options, user) => { // if (! user.services.facebook) { // throw new Error('Expected login with Facebook only.'); // } console.log('created a user') UserOrders.insert({ _id: user._id, current...
var htags=document.getElementsByTagName("h1") for(let tags of htags){ tags.style.color="red"; } var lst=document.getElementsByTagName("li") for(let tags of lst){ tags.style.color="green"; } //let hone=document.getElementById("hone") //hone.style.color="blue"; var cls=document.getElementsByClassName("lt") for(let tags ...
const Sequelize = require('sequelize'); module.exports = function(sequelize, DataTypes) { return sequelize.define('ReportViewedProductAggregatedYearly', { id: { autoIncrement: true, type: DataTypes.INTEGER.UNSIGNED, allowNull: false, primaryKey: true, comment: "ID" }, period:...
import React from 'react' import ReactDOM from 'react-dom' import { PersistGate } from 'redux-persist/integration/react' import { Provider } from 'react-redux' import { Routes } from './routes' import store, { persist } from './store' import './index.css' import { SocialIcons } from './components/SocialMedia' import { ...
import styled from 'styled-components'; const CategoryCard = styled.div ` display:grid; width:100%; padding:10px 0; grid-template-columns: minmax(320px, 640px); img{ width:100%; height:auto; object-fit: cover; } ${({theme}) => theme.media.mobile} { grid-template-columns:${(props) => pro...
app.controller("ProjectHierarchyController",function($scope,$http,ngDialog,$upload) { $scope.index = 10; $scope.Message = ""; maximumId = 2; $scope.selectRootNode= null; $scope.projectsearch= { projectValue:[], parentId:'', projectId:'', projectTypes:'', projectDescription...
import React from "react"; import Button from "@material-ui/core/Button"; import Cookies from "universal-cookie"; import FavoriteIcon from "@material-ui/icons/Favorite"; //import IconButton from "@material-ui/core/IconButton"; import Card from "@material-ui/core/Card"; import CardActions from "@material-ui/...
const colors = [ 'white', 'yellow', 'blue', 'red', 'green', 'black', 'orange' ] let colorID = 0 const addNewProject = async (event, dispatch) => { const newProject = { name: event.target[0].value, color: colors[colorID % colors.length] } console.log('new projec...
/* global $, Materialize */ $(document).ready(function () { $('.button-collapse').sideNav() $('.dropdown-button').dropdown({ constrainWidth: false }) Materialize.updateTextFields() })
const express = require('express'); const app = express(); const mongoose = require('mongoose'); const bodyParser = require('body-parser'); const cookieParser = require('cookie-parser'); const bcrypt = require('bcrypt'); const jwt = require('jsonwebtoken'); const config = require('./server/config/keys'); const { User...
const validator = require("validator"); const Channel = require("../models/channelsModel"); const store = require("../store"); const isMessageTypeAllowed = require("../utils/isMessageTypeAllowed"); const ChannelsModel = new Channel(store); // returns a list of all the channels exports.channelList = function channelLi...
import React from "react"; import { Link, NavLink } from "react-router-dom"; import styled from "styled-components"; import PropTypes from "prop-types"; import ReactRouterPropTypes from "react-router-prop-types"; import { ArrowRight } from "../BaseComponents/SVGIcons"; import Text from "../BaseComponents/Text"; import ...
'use strict'; exports.up = function(knex, Promise) { return knex.schema.createTable('log', function(table) { table.increments(); table.datetime('createdAt'); table.datetime('updatedAt'); table.json('log'); table.text('stackTrace'); table.text('type'); table.text('referenceModel'); table.text('r...
import React from 'react'; import Expandable from '../high_order/expandable.jsx'; import UserStore from '../../stores/user_store.js'; import AlertsStore from '../../stores/alerts_store.js'; import AlertActions from '../../actions/alert_actions.js'; const getState = () => ({ contentExperts: UserStore.getFiltered(...
import React from 'react'; import { SvgIcon } from '@material-ui/core'; const FilterIcon = () => { return ( <SvgIcon> <path d="M0,64l192,192v192l128-32V256L512,64H0z" /> </SvgIcon> ); }; export default FilterIcon;
export const artists = [] export const albums = []
/* @flow */ import Reactotron from 'reactotron-react-native' import { reactotronRedux } from 'reactotron-redux' /* Wrapping Reactotron in __DEV__ to ensure it's not run in production. Reason is ES6 module loading is a compile-time thing, so it complains if we have it as a dev-dependency */ if (__DEV__) { React...
import React from "react"; import { Formik } from "formik"; import B from "../photos/B.jpeg"; const ContactUs = () => { return ( <div style={{ // backgroundImage: `url(${B})`, // backgroundPosition: "center", // backgroundSize: "cover", // backgroundRepeat: "no-repeat", ...
const ACTORS_CONFIG = { "0": { "color": "#CFE596", "speed": 9, "size": 1, "life": 174, "armour": 91, "energy": 181, "nutrition": 148, "hidratation": 89 }, "1": { "color": "#446CE4", "speed": 7, "size": 7, "life": 93, "armour": 122, "energy": 74, "nutrition": 184, "hidratation": 106 }...
'use strict'; /** * Internal dependencies */ var config = require( '../config' ), canvasUtils = require( '../utils/canvas-utils' ); module.exports = { convertToHiDPICanvas: function() { var pixelRatio = canvasUtils.getPixelRatio(), canvas = this.refs.canvas.getDOMNode(); canvas.width = config.canvas.width...
const expect = require("chai").expect; const isPalindrome = require("./palindrome"); describe("palindrome", function() { it("exists as a function", function() { expect(isPalindrome).to.be.a("function"); }); it("identifies one word palindromes", function() { expect(isPalindrome("racecar")).to.be.true; ...
var width = $(window).width(); var height = $(window).height(); var popup = false; var maxRadius = 100; var minRadius = 30; var right_border = width - maxRadius; var left_border = maxRadius; var top_border = maxRadius; var bottom_border = height - maxRadius; if (height < 900) { height = 900; } var svg = d3.se...
/* global define */ define('app/exts/pagination/pagination.tpl', function() { return '\ <div class="pagination-new">\ <div class="pagination">\ \ <a href="javascript: void(0);" class="btn-first btn btn-xlarge<%= hasPrev ? \' btn-white\' : \' btn-unreach\' %>" bx-click="moveTo(<%=prev%>)"><span class=...
const followers = require('./followers') module.exports = followers;
/* becode/javascript * * /11-fetch/03-details/script.js - 11.3: details * * coded by leny@BeCode * started at 12/05/2019 */ // NOTE: don't focus on the existing code structure for now. // You will have time to focus on it later. (() => { document.getElementById('run').addEventListener("click", () => { ...
import "./Result.css"; import React, { useState, useEffect } from "react"; const Result = ({ result, error }) => { const [errorMsg, setErrorMsg] = useState(""); useEffect(() => { switch (error) { case "divideByZero": setErrorMsg("cannot be divided by zero"); break; case "exp1": ...
import Vue from 'vue' import Router from 'vue-router' import firebase from 'firebase/app' import noStream from '@/views/noStream' import noUser from '@/views/noUser' import Check from '@/views/Check' import Home from '@/views/Home' Vue.use(Router) let router = new Router({ mode: 'history', routes: [ { p...
/* 🤖 this file was generated by svg-to-ts*/ export const EOSIconsPageview = { name: 'pageview', data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11.5 9a2.5 2.5 0 000 5 2.5 2.5 0 000-5zM20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-3.21 14.21l-2.91-2.91...
function reziseMyHeaderFont() { var bannerObject = document.getElementById("centerTitleBar"); var referenceObject = document.getElementsByClassName("article-header")[0]; var widthOfPage = referenceObject.scrollWidth; if(widthOfPage < 500) { bannerObject.style.fontSize = "4vw"; } else { b...
'use strict' const sdk = require('../../src/sdk.js') const mockApi = require('../mock/api.js') require('should') describe('Zabo SDK Transactions Resource', () => { let transactions it('should be instantiated during zabo.init()', async function () { await sdk.init({ apiKey: 'some-api-key', secretK...
// index2.js var request = require('request') var googleMapsAPI = require('./googleMapsAPI') var hardCodedAddress = "46%20Spadina%20Ave" googleMapsAPI.getPostalCode(process.argv[2], function(postalCode) { console.log("The postal code is: ", postalCode); })
module.exports = (err, req, res, next) => { if (err.kind === 'ObjectId') { return res.status(404).json({ error: true, message: 'Invalid resource ID', }); } if (err.name === 'JsonWebTokenError') { return res .status(400) .json({ error: true, message: 'Invalid URL (Token not verified)' }); } res.st...
const main = document.querySelector('main'); const search = document.getElementById('search'); const filter = document.getElementById('filter'); const toggleMenu = document.getElementById('toggleMenu'); const menuGone = document.getElementById('menuGone'); const selectHerkomst = document.querySelectorAll('.continetenL...
import React, { Component } from 'react'; import { View, Text, Modal, Dimensions, StyleSheet, TouchableOpacity, StatusBar, Platform, } from 'react-native'; import ScrollableTabView from 'react-native-scrollable-tab-view'; import { connect } from 'rn-dva'; import { TASK_CATEGORIES, TASK_TYPES_DESPCRIPTION, TASK_MERC...
module.exports = { plugins: ['import'], rules: { // Static analysis: // ensure imports point to files/modules that can be resolved // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unresolved.md 'import/no-unresolved': ['error', { commonjs: true, caseSensitive: true }],...
import React from 'react' import { SafeAreaView, StyleSheet, View, Text, TouchableOpacity, FlatList } from 'react-native' import { Header } from '@components' import { DummyData, constants } from '@config' import { styles } from '@styles' const Correct = ({ navigation }) => { return ( <View style={styles....
import React from 'react'; import notLoggedIn from '../notLoggedIn'; import Users from './Users'; import * as api from '../../api/api'; import Nav from '../Nav/Nav'; class UsersContainer extends React.Component { constructor(props) { super(props); this.saveUsersInState = this.saveUsersInState.bind(this); ...
$( document ).ready(function() { function showDialogBox(actionCall, retBtn) { $(".retConfOverlayBox").dialog({ draggable: true, resizable: false, closeText: "close", height:150, width:400, modal: true, show: {effect: 'fade', duration: 500}, hide: {effect: 'fade', duration: 500}, open: fun...
// given two strings, count number of // times smaller string appears in longer string // O(n^2) function strCount(long, short){ let counter = 0; for(let i = 0; i < long.length; i++){ for(let j = 0; j < short.length; j++){ if(long[i+j] !== short[j]) break; if(j === short.length - 1) counter++; ...
var d_underscore = d_; //testing the d_.each method var arrayExample = [1,2,3,4,5]; console.log('Testing the d_.each() method...'); d_underscore.forEach(arrayExample,function(item){ console.log(item*2); }); //Testing the d_.map() function //testing with an array as argument console.log('Testing the d_.map() method...
import React from 'react'; export const Summary = ({level, highestLevel}) => ( <div> <h1>Pick The Odd One Out</h1> <div className="score"> <span className="current">Current Level: {level}</span> <span className="highest">Highest Level: {highestLevel}</span> </div> </div> );
var Metalsmith = require('metalsmith'), markdown = require('metalsmith-markdown'), collections = require('metalsmith-collections'), stylus = require('metalsmith-stylus'), watch = require('metalsmith-watch'), ignore = require('metalsmith-ignore'), assets = require('metalsmith-static'), templa...
var histcatexplong=[]; //stores data formatted for visualization per university var country_formatted_data=[];//stores data formatted for visualization per country var uniPerCountry; //maps countries to their universities var keys=[]; //keep track of already visualized universities var requestedCountries=[]; //kee...
const userMapper = require('./user') exports.toModel = function (entity) { let model = { id: entity.id, email: entity.email, name: entity.name } return model } exports.toSearchModel = function (entities) { let models = [] for (const entity of entities) { models.push...
// Generated by CoffeeScript 2.4.1 I Hate CoffeeScript 2019 And I Was Far Too Peeved To Fix This Stupid Code (function() { var TwitterModule, http, imgPattern, msgPattern, request; http = require('https'); request = require('request-promise'); imgPattern = /<meta\s+property="og:image"\s+conte...
//display-only text box var textBox = document.getElementById("text-box") //var clickedLetter = function onButtonClick(clickedLetter) { textBox.innerHTML += clickedLetter } function onPlayButtonClick(clickedLetters) { alert(textBox.innerHTML) } //have to put variable name as an argument /* First class ci...
export {default} from 'ember-appointment-slots-pickers/components/slots-picker/pickadate/component';
require('../css/index.css'); import $ from './jquery.min'; //点击导航栏 $('menu li').click(function () { var targetId = $(this).data('target'), targetDom = $('#' + targetId); goToElement(targetDom); }); //点击下一页图标 $('.next').click(function () { var thisDom = $(this).closest('section'), targetDom ...
import React from "react"; import google from "../../crispimage/google.png"; import linke from "../../crispimage/linke.png"; const Idprovider = () => { return ( <section className="signin "> <h6 class="thin light-text text-center">Sign in with ID Provider</h6> <div class="providers"> <button c...
/** * Created by asus on 2016/8/3. */ $(function(){ //导航栏动画特效 var timer=null; $(".ul-lists>.change").mouseenter(function(){ $(this).children(".ul-lists-pubic").css("backgroundColor","red").stop(true,true).animate({"width":"70px"},1000); $(this).children(".ul-lists-show").slideDown(500); ...