text stringlengths 7 3.69M |
|---|
function initialize(){
ARSynth.init({
noteElm: $('#note')[0],
frequencyElm: $('#frequency')[0]
});
$('#color').bind('change', function(){
ARSynth.set('color', this.value); // hex color
});
$('#color2').bind('change', function(){
ARSynth.set('color2', this.value); // hex color
});
$('#col... |
const express = require('express');
const mongoose = require('mongoose');
const bodyParser = require('body-parser');
const session = require('express-session');
const passport = require('passport');
LocalStrategy = require('passport-local').Strategy;
const app = express();
app.use(bodyParser.json());
app.use(bodyPars... |
import React from 'react';
import ReactTestUtils from 'react-dom/test-utils';
import { render } from '@testing-library/react';
import { getDOMNode, getInstance } from '@test/testUtils';
import { testStandardProps } from '@test/commonCases';
import Breadcrumb from '../Breadcrumb';
afterEach(() => {
sinon.restore();
}... |
secretBox = document.getElementById("SecretBox");
maxLossStreak = document.getElementById("MaxLossStreak");
balanceForStop = document.getElementById("BalanceForStop");
betBox = document.getElementById("BetBox");
bankrollArea = document.getElementById("Bankroll");
earningsArea = document.getElementById("Earnings");... |
/*
* Alfred Lam
* CMPS 161
* Prog 2
* map.js - reads in 5 csv files with data, merges them into 1 array, and displays the results in interactive
* ways using D3 and SVG elements.
*/
//Width and height
let w = 760;
let h = 600;
//Define map projection
let projection = d3.geoMercator()
... |
/* globals describe, it, expect */
import { Readable } from 'stream';
import { prepareParams } from '../../src/helpers/index.js';
import {
body,
cookies,
headers,
params,
queries
} from '../../src/request-proto/index.js';
describe('headers normalize', () => {
it('header normalize non-empty', () => {
co... |
import React from 'react'
import IssueList from './IssueList'
import renderer from 'react-test-renderer'
import { noErrorsAllowed } from '../common/test-utils'
noErrorsAllowed()
describe('IssueList component', () => {
it('renders without crashing', () => {
const issues = []
const rendered = renderer.create... |
var React = require('react');
var TableInput = React.createClass({
render: function () {
console.log('where is this?',this.props.state.string);
//creating an array of where all the semicolons are
var semicolons = [];
for(var i = 0; i < this.props.state.string.length; i++){
if (this.props.state... |
var Onlineuser = React.createClass({
render:function(){
return (
<div className="online-user-list">
<div className="online-users-number valign-wrapper">
<i className="material-icons">people</i><span className="valign">online </span>
</div>
<ul>
<li>
<user-avatar uuid=""></... |
var jsonpBtn=$('#jsonpBtn');
jsonpBtn.addEventListener('click',function(){
createScript();
})
var corsBtn=$('#corsBtn')
function $(e){
return document.querySelector(e);
}
function jsonp(data){
var dailyWork=$('.dailyWork');
var html='';
for(var i=0;i<data.length;i++){
html+='<li>'+data[i]+'</li>';
}
d... |
import React, {Component} from 'react';
import {
View,
Image,
} from 'react-native';
import styles from './styles'
import {compose} from "redux";
import {connect} from 'react-redux'
import {Text, Button, Icon, Form, Item, Label, Input, Container,Content, Thumbnail} from "native-base";
import {SYSTEM_ROUTES} fro... |
TOTAL = "共計";
NOW_DISPLAY_RECORD = "當前顯示記錄";
NOTHING_DISPLAY = "沒有記錄可以顯示";
//grid
USERID = "會員編號";
USERNAME = "姓名";
USERGENDER = "性別";
MAN = "先生";
WOMAN = "小姐";
BIRTHDAY = "年齡";
REGDATE = "註冊時間";
CREATEDATE = "最近歸檔日";
SUMAMOUNT = "購買金額";
COU = "購買次數";
AVERAMOUNT = "客單價";
SUMBONUS = "購物金使用";
NORMALPROD = "常溫商品總額";
FREI... |
// We import express, cors, and shortid at the top
import express from "express"
const app = express()
import cors from "cors"
app.use(cors())
app.use(express.json())
import shortid from 'shortid'
// We manually input an array of preset notes in our database each with an id, title, color, and an array of issues
app.lo... |
const parser = require('freestyle-parser');
const fileIO = require('bozoid-file-grabber');
exports.eventGroup = 'onMessage';
exports.command = 'stats';
exports.description = 'list database and usage stats';
exports.script = function(cmd, msg){
stat_blacklist = fileIO.read('blacklist.json').list.length
stat_frickjar... |
(function($) {
Drupal.behaviors.ArchiveDigest = {
attach:function (context, settings) {
var timeStart = '';
var timeFinish = '';
var dates = [];
$('.views-widget-filter-created').hide();
var DateStrReturn = function(dt) {
d = (dt.ge... |
const mongoose = require('mongoose');
const moment = require('moment');
const Task = require('../../models/Task');
var tasksController = {};
tasksController.index = function(req, res) {
const { title, date, status } = req.query;
let query = {};
if (date) {
query.createdAt = {
$gte: moment(date, "YYYY-M... |
function alguma(id) {
var apagar = confirm('Você deseja excluir este usuário');
if (apagar){
location.href = 'excluir/'+ id;
}else{
alert('ufaaa, quase deletou o usuario errado.');
}
}
|
'use strict';
class Node {
constructor(value){
this.value = value;
this.prev = null;
this.next = null;
}
}
class StackClass{
constructor (){
this.prevPush = null;
this.nextInLine = null;
this.length =0;
}
push(value){
//if top is null current node is top
... |
/*
* Route: /apps/:appId/sources/:appSourceId/webhooks
*/
const webhookAuthorize = rootRequire('/middlewares/webhooks/authorize');
const sources = rootRequire('/libs/app/sources');
const router = express.Router({
mergeParams: true,
});
/*
* GET
*/
router.get('/',webhookAuthorize);
router.get('/', (request, re... |
export const SET_USER_ID = 'SET_USER_ID';
export const ADD_USER_SUCCESS = 'ADD_USER_SUCCESS';
export const SET_TOKEN = 'SET_TOKEN';
export const SET_USER = 'SET_USER';
export const EDIT_USER = 'EDIT_USER';
export const SIGN_OUT = 'SIGN_OUT';
export const SET_REGION = 'SET_REGION';
export const SET_STAGE = 'SET_STAGE';
... |
const Discord = require("discord.js");
module.exports.run = async (bot, message, args) => {
message.delete().catch(O_o=>{});
let bicon = bot.user.avatarURL;
const embed = new Discord.RichEmbed()
.setTitle("ИНФОРМАЦИЯ О БОТЕ")
.setColor("#4C8BF5")
.setThumbnail(bicon)
.addField("Ник бота:", bot.user.username,... |
import { useCallback, useEffect, useState } from 'react';
export const useTagHolder = (defaultTags) => {
const [tags, setTags] = useState([]);
const [unTags, setUnTags] = useState(defaultTags || []);
const tagChange = useCallback(
(tag) => {
if (~tags.indexOf(tag)) {
setTags((prev) => {
... |
/* eslint-disable */
module.exports = [
{
"id":0,
"category":"phone",
"name":"productnamMoto X (4th Generation) - with hands-free Amazon Alexa – 32 GB - Unlocked – Super Black - Prime Exclusive",
"image_url":[
"https://images-na.ssl-images-amazon.com/images/I/71qpbk55hmL._SX522_.jpg"... |
var tpl = require('./a.atpl');
console.log(tpl({
a: ['a', 'b', 'c']
}));
|
import test from 'blue-tape';
import MySQLSink from '../lib/MySQLWriteStream';
import config from './test.config';
import fs from 'fs';
import knex from 'knex';
import inferSchema from '../lib/util/inferSchema';
import _ from 'highland';
// test('proper configuration', t => {
// t.equal(MySQLSource.props.name, req... |
import React, { useEffect, useState } from "react";
import { Redirect } from "react-router-dom";
import { token$, updateToken } from "../store/authToken";
import { parseQueryString } from "../utils";
const LoginDone = () => {
let [token, update] = useState(token$.value);
useEffect(() => {
let subscription = ... |
/*
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Finish the solution so that it returns the sum of all the multiples of 3 or 5 below the number passed in.
Note: If the number is a multiple of both 3 and 5, only count it once.
Courtesy... |
import React from 'react';
import './SendMoneyToCardForm.css';
import {
Form, Input, Button, Select
} from 'antd';
import { currencyCode } from '../../utils/moneyUtils';
const Option = Select.Option;
class SendMoneyToCardForm extends React.Component {
onSubmit = e => {
e.preventDefault();
t... |
const express = require('express');
const mongoose = require('mongoose');
const satAuth = require('./authentication').authLayer;
const init = require('./initalize');
// Routers
const userRoutes = require('./json/users');
const nomineeRoutes = require('./json/nominees');
const campRoutes = require('./json/camps');
cons... |
// JavaScript Document
<!--豪华游艇-->
function setTabHAO(name, cursel, n) {
for (i = 1; i <= n; i++) {
var menu = document.getElementById(name + i);
var con = document.getElementById("con_" + name + "_" + i);
menu.className = i == cursel ? "hover" : "";
con.style.display = i == curse... |
var config = {
apiKey: "AIzaSyBdfcvDs20C83am7k39wk6yK1VADvixnCc",
authDomain: "brawl-live.firebaseapp.com",
databaseURL: "https://brawl-live.firebaseio.com",
projectId: "brawl-live",
storageBucket: "brawl-live.appspot.com",
messagingSenderId: "473229450954",
appId: "1:473229450954:web:cfc6f24208493369"
};... |
/* eslint-disable max-len */
import UrlParser from '../../routes/url-parser';
import TheRestaurantDbSource from '../../data/therestaurantdb-source';
import {
createRestaurantDetailTemplate,
createRestaurantImageTemplate,
createRestaurantCategoriesTemplate,
createRestaurantReviewsTemplate,
} from '../templates/t... |
import React, { Component, PureComponent } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
constructor(props) {
super(props);
this.veryNestedObject = {
child: { }
};
let ref = this.veryNestedObject.child;
this.startTime = (new Date()).getTim... |
import React, {Component} from 'react';
import {View, Text, Image, ImageBackground, Dimensions, ScrollView, Platform} from 'react-native';
import { Button, Badge, Avatar } from 'react-native-elements';
import ActivityTile from './common/ActivityTile';
import MessageComponent from './common/MessageComponent';
import Eve... |
import React, { Component } from 'react';
import {
AreaChart, Area, XAxis, YAxis, CartesianGrid, Tooltip,
} from 'recharts';
class gaschart extends Component {
formatData() {
var fromData = {}
var valData = {};
var toData = {};
fromData['name'] = this.props.apiFuelData.data.from;
valData['name... |
const db = require("../models")
const Client = db.client
exports.create = (req, res) => {
if (!req.body.name) {
res.status(400).send({ message: "name can not be empty!" })
return
}
const client = new Client({
name: req.body.name,
birthDate: req.body.birthdate,
lastName: req.body.lastName,
... |
let playerList = [];
axios({
method: "GET",
url: "https://5e9829e75eabe7001681bbfb.mockapi.io/player",
})
.then((res) => {
playerList = res.data;
renderLayout(playerList);
console.log(playerList);
})
.catch((err) => {
console.log({ ...err });
});
const renderLayout = (list) => {
var cont... |
const assertEqual = require('./assertEqual');
// const assertEqual = function(actual, expected) {
// if (actual === expected) {
// console.log(`These two arguemnts are the same: ${actual} vs ${expected}`);
// } else {
// console.log(`These two arguemnts are NOT the same: ${actual} vs ${expected}`);
// }... |
import React from 'react';
import Styled from 'styled-components/native';
import TodoListView from './TodoListView';
import AddTodo from './AddTodo';
const Container = Styled.View`
flex: 1;
`;
const Todo = () => {
return (
<Container>
<TodoListView />
<AddTodo />
</Con... |
import React from 'react';
import { ModalContext } from "../Context/ModalContext";
import './Photo.css';
function Photo(props) {
let { handleModal } = React.useContext(ModalContext);
return (
<div className="Photo">
<img src={props.url} alt={'image-' + props.id} onClick={() => handleModal(... |
window.addEventListener('DOMContentLoaded', () => {
let monthBlock = document.getElementById('month'),
yearBlock = document.getElementById('yearBlock'),
calendarBlock = document.getElementById('calendar');
/**
* class Calendar
*/
class Celendar {
/**
* All name o... |
/**
* @fileoverview Application server for hosting static application files and
* client to client mapping actions.
*/
var fs = require('fs');
var path = require('path');
var http = require('http');
var sio = require('socket.io');
var url = require('url');
var mapbox = require(path.join(__dirname, 'mapbox.js')... |
const Entry = require('../../models/entry');
const router = require('express').Router();
// need to make sure entries get added to users array
var date = new Date();
router.post('/', (req, res, next) => {
if (req.user)
{
var history = [];
for (i = req.user.entries.length-1 ; i >= 0; --i)
... |
// Task 0.7
function toCelsius(temp) {
const celsius = (temp - 32) * 5 / 9;
return celsius;
}
console.log(toCelsius(32) + 'C');
function toFahrenheit(temp) {
const fahrenheit = (temp * 9 / 5) + 32;
return fahrenheit;
}
console.log(toFahrenheit(0) + 'F');
|
"use strict";
var tnt = {};
tnt.track = require('./track');
tnt.utils = {};
tnt.utils.api = require("../utils/api");
tnt.track.data = function() {
var track_data = function () {
};
// Getters / Setters
tnt.utils.api (track_data)
.getset ('label', "")
.getset ('elements', [])
.getset... |
var namespace_mikkeo_1_1_colour =
[
[ "HSBColor", "struct_mikkeo_1_1_colour_1_1_h_s_b_color.html", "struct_mikkeo_1_1_colour_1_1_h_s_b_color" ]
]; |
const rateLimit = require('express-rate-limit');
const slowDown = require('express-slow-down');
// Limiters for api/users
const userRateLimiter = rateLimit({
windowMs: 15 * 60 * 1000,
max: 5,
message: {
msg: 'Too many requests, please try again later'
}
});
const userSlowDown = slowDown({
windowMs: 15 *... |
const chatForm = document.getElementById('chat-form');
const roomName = document.getElementById('room-name');
const userList = document.getElementById('users');
// We use query selector to select the class from the dom.
const chatMessages = document.querySelector('.chat-messages');
const socket = io();
// Using qs (qu... |
import { createStore } from 'redux';
// DOM cache
const resultEl = document.getElementById('result__number');
const inputEl = document.getElementById('input');
const add = document.getElementById('add');
const substract = document.getElementById('substract');
const reset = document.getElementById('reset');
const init... |
import React, {Component} from 'react'
import {MDBBox, MDBBtn, MDBCard, MDBSelect,} from 'mdbreact'
import {connect} from 'react-redux'
import DocumentAPI from "../../../api/documentAPI";
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome";
import {faCircle as faCircleSolid, faFile,} from "@fortawesome/pro-s... |
window.onload = function(event) {
resizeAll();
// Hide loading page when windows is loaded
document.getElementsByClassName("loading")[0].style.display = 'none';
}
window.onresize = function(event) {
resizeAll();
};
function resizeAll(){
var mainWidth = document.getElementsByClassName('main-div')[0... |
import React from 'react';
import './BlogPage.css';
import PropTypes from 'prop-types';
import ReactMarkdown from 'react-markdown'
export class BlogPage extends React.Component {
constructor(props) {
super(props);
this.state = {
blogPost: [],
isLoading: true,
error: null
};
}
... |
import React, {Component} from 'react';
import withStyles from "@material-ui/core/styles/withStyles";
import ExpansionPanel from '@material-ui/core/ExpansionPanel';
import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';
import Typography from '@material-ui/core/Typography';
import Button from '@ma... |
///TODO: REVIEW
/**
* @param {string} s
* @param {number} k
* @return {number}
*/
var characterReplacement = function(s, k) {
var res = 0, maxCount = 0, start = 0;
var counts = [];
for (var i = 0; i<26; i++) counts[i] = 0;
for(var i = 0; i< s.length; i++) {
var index = s[i].charCodeAt(0) -65; // 'A'
... |
let bannerButton = document.getElementById('banner');
let serch = document.getElementById('serch');
let iconClose = document.getElementById('iconClose');
let serchContainerItems = document.getElementById('serchContainerItems');
let serchContainer = document.getElementById('serchContainer');
let serchMessage = document.... |
/*
* @Description: WebviewJavascriptBridge
* @Author: sailei
* @Date: 2018-12-15 14:16:12
*/
function setupWebViewJavascriptBridge (callback) {
if (window.WebViewJavascriptBridge) {
return callback(window.WebViewJavascriptBridge)
}
if (window.WVJBCallbacks) {
return window.WVJBCallba... |
'use strict';
const path = require('path');
const fs = require('fs-extra');
const exec = require('child_process').exec;
const expect = require('chai').expect;
const FILE = path.join(__dirname, '../tests/dummy/app/some.md');
const TIMEOUT = 60000;
describe('ember-cli-eslint', function () {
this.timeout(TIMEOUT);
... |
var Record = require('../record.js')
var assert = require('assert')
describe ('record store', function(){
var record
beforeEach(function(){
record = new Record('Justin Bieber','Greatest Hits','pop', 999 )
})
it('can see properties of record', function(){
// record.inspectRecord(record)
assert.... |
$(function() {
let allId = ["cab1", "cab2", "fub1", "fub2", "crb1", "crb2", "ftb1", "ftb2", "ccb1", "ccb2", "cob1", "cob2", "pab1", "pab2", "dob1", "dob2", "cub1", "cub2", "wab1", "wab2", "bmb1", "bmb2", "apb1", "apb2"];
let allClass = [".cake", ".fudge", ".croll", ".ftoast", ".cheesecake", ".cookies", ".pancak... |
import express from "express";
const router = express.Router();
import pool from "../db";
import { adminAuthenticationRequired } from "../AuthenticationMiddleware/AuthenticationMiddleware";
// @router GET "/api/products/o1/:name/:offset"
// @desc Returns the object by similar name
// @access public
router.get("/o1/:nam... |
(function() {
describe("Grocery List", function() {
beforeAll(function() {
return browser.get("http://localhost:8000/6/index.html");
});
it("says 'Grocery List' at the top", function() {
expect($('h1')).isDisplayed();
return expect($('h1').getText()).toBe('Grocery List');
});
it(... |
const EMPTY_CELL = "";
$().ready(function() {
var newGame = Object.create(GamePrototype);
newGame.init();
newGame.playGame();
});
//Game object
var GamePrototype = {
init: function() {
this.players = [];
var player1 = Object.create(PlayerPrototype),
player2 = Object.create(Pla... |
import React from 'react';
import './Product..css';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faShoppingCart } from '@fortawesome/free-solid-svg-icons';
const Product = (props) => {
const {img, name, seller, price, stock} = props.product;
return (
<div className = 'pro... |
export const SELECT_CHARACTER_ONE_STYLE = "selectCharacterOneStyle";
export default function selectCharacterOneStyle(styleIndex, character) {
return {
type: SELECT_CHARACTER_ONE_STYLE,
styleIndex,
character
};
}
|
/* eslint-disable @next/next/no-img-element */
import axios from "axios";
import React, { use, useEffect, useState } from "react";
import styles from "../../styles/Admin.module.css";
import Modal from "../../components/common/CreatePizzaModal"
import { API_BASE_URL } from "../../util/constant";
import Loader from "../.... |
const {Department, Role, Employee} = require('../models');
const Table = require('cli-table');
const { nameCombine } = require('../config/helpers');
module.exports = {
// The listAll func will retreive all data from the data base in a certain category and log it
listAll: async (category) => {
// Use a ... |
require('../css/style.css');
import React from 'react';
import ReactDOM from 'react-dom';
import _ from 'lodash';
import Appts from './Appts';
import AddAppts from './AddAppts';
import SearchAppts from './SearchAppts';
var PetsAppts = React.createClass({
// getInitialState
getInitialState() {
... |
const Discord = require("discord.js");
const fs = require("fs");
const ms = require("ms");
var mongoose = require("mongoose");
mongoose.Promise = global.Promise;mongoose.connect(process.env.MONGO_URL);
var User = require('./../schemas/user_model.js');
function isNumeric(value) {
return /^\d+$/.test(value);
}
module.... |
class Paper extends dustbin{
constructor(x,y){
super(x,y)
var options = {
isStatic: false,
restitution:0.3,
friction:0,
density:1.2
}
this.image=loadImage("paper.png")
}
}
function keyPressed(){
if (keyCode === UP_ARROW) {
Matter.Body.applyForce(paperObject... |
/**
* Copyright (c) 2011-2015 Berkeley Model United Nations. All rights reserved.
* Use of this source code is governed by a BSD License (see LICENSE).
*/
'use strict';
var $ = require('jquery');
var Promise = require('es6-promise').Promise;
var _countryPromise = null;
var CountryStore = {
getCountries: funct... |
import React from "react";
import styled from "styled-components";
import tick from "../../../../assets/images/tick.svg";
import moment from "moment";
import InfoStudent from "./InfoStudent";
const StyledStep3 = styled.section`
margin-bottom: auto;
.Step3__inner {
max-width: 800px;
margin: 0 auto 10%;
... |
import { findAllByDisplayValue } from "@testing-library/react";
export const initialState = {
user: null,
playlists: [],
spotify: null,
discover_weekly: null,
top_artists: null,
playing: false,
item: null,
};
// State is how it currently looks like
// Action is what i manipulate what the da... |
const format = require('../../../format');
const template = require('./format.joi');
const payload = {
title: Math.random().toString(36).substring(7),
score: Math.random().toString(36).substring(7),
linkThread: Math.random().toString(36).substring(7),
linkComment: Math.random().toString(36).substring(7),
};
d... |
import React from 'react';
const Container = ({ children }) => (
<section>
{children}
<hr />
</section>
);
export default Container;
|
/* Gruntfile for Real Housewives Memory Challenge HTML5 project production packging.
*
* Project Dependencies:
npm install grunt --save-dev
npm install grunt-contrib-clean --save-dev
npm install grunt-contrib-watch --save-dev
npm install grunt-contrib-imagemin --save-dev
npm install grunt-contrib-htmlmin... |
const applicationsActionTypes = {
ADD_APPLICATION: 'ADD_APPLICATION',
GET_APPLICATION: 'GET_APPLICATION',
UPDATE_APPLICATION: 'UPDATE_APPLICATION'
}
export default applicationsActionTypes; |
import React, { Component } from 'react';
import { Link, withRouter } from "react-router-dom";
import { Nav, Navbar, NavItem } from "react-bootstrap";
import { LinkContainer } from "react-router-bootstrap";
import Routes from "./Routes";
import { userService } from './API'
import {connect} from 'react-redux'
import {lo... |
"use strict";
$(document).ready(function () {
var BLACK = "rgb(0, 0, 0)";
var RED = "rgb(255, 0, 0)";
function logic1(avi, a, row, column, n, color, h, k) {
var j = 0;
var msg = "";
for (j=0; j<n; j++) {
a[row[j]].css([column[j]], {"color": color});
}
a[h].highlight([k]);
avi.clearu... |
const searchMeals = () => {
const searchText = document.getElementById('search-field').value;
const url = `https://www.themealdb.com/api/json/v1/1/search.php?s=${searchText}`;
fetch(url)
.then(res => res.json())
.then(data => disPlayMeals(data.meals))
}
const disPlayMeals = meals => {
const mealContainer =... |
var dnsTxt = require('dns-txt')()
module.exports = Service
function Service() {
this.name = '';
this.type = '';
this.fqdn = '';
this.host = '';
this.port = '';
this.ipv4 = [];
this.ipv6 = [];
this.txt = {};
this.status = true;
}
Service.prototype.serialize = function (answers, opt... |
export const APP_THEME_COLOR = '#000';
export const APP_ORANGE_COLOR = '#B58D37';
export const APP_ORANGE_TEXT_COLOR = 'rgba(255,155,0,1.0)';
export const APP_YELLOW_COLOR = '#f4e282';
export const APP_BLACK_COLOR = 'rgba(33,33,33,1)';
export const APP_WHITE_COLOR = '#FFF';
export const APP_RED_COLOR = '#A80B02';
expo... |
import {
SET_USER_PUBLIC_KEY,
GENERATE_BITCOIN_ADDRESS,
GET_ECKEY,
LOAD,
} from '../actions/redux';
export default (state = {}, action) => {
switch (action.type) {
case SET_USER_PUBLIC_KEY:
return { ...state, userPublicKey: action.payload.userPublicKey };
case GENERATE_BITCOIN_ADDRESS:
re... |
const CONFIG = {
introTitle: 'Babe à!',
introDesc:“Có biết anh nhớ em đến mức nào không? Có biết anh phiền muộn đến thế nào không? Em không cần biết, vì những điều này chỉ nên để anh chịu đựng, anh chỉ cần trong lòng em có anh, chỉ có anh, còn lại tất cả đều giao cho anh gánh vác.”
btnIntro: 'hihi',
t... |
// JavaScript - Node v8.1.3
describe('class Labrador', _ => {
it('should instantiate objects as expected', _ => {
var spitsy = new Labrador('Spitsy', 10, 'Male', 'Donald');
Test.assertEquals(spitsy.name, 'Spitsy');
Test.assertEquals(spitsy.age, 10);
Test.assertEquals(spitsy.gender, ... |
// Copyright (C) 2018-Present Masato Nomiyama
import React from 'react'
import { withStyles } from '@material-ui/core/styles'
import Typography from '@material-ui/core/Typography'
import { style } from '../theme'
const customStyle = theme => {
return {
...style,
title: {
margin: '24px 0 0',
},
... |
let titleText = 'Привет, мой друг! Добро пожаловать на сайт группы отелей Selly Hotels!';
let promoTitle = document.getElementById('promoTitle'); // получаем заголовок страницы
promoTitle.innerText = titleText; // заменяем текст в заголовке
let button = document.getElementById('showAllFeedbacks');
button.addEventList... |
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "877af318d1175c80c6a2d58adbd164f6",
"url": "/index.html"
},
{
"revision": "e434d131dc04a2e28398",
"url": "/static/css/2.6aabea0b.chunk.css"
},
{
"revision": "a52d2a920e71151d7419",
"url": "/static/css/main... |
export { default } from 'ember-cli-amplify/services/amplify';
|
(function($) {
"use strict";
$(".main-menu a").click(function(){
var id = $(this).attr('class');
id = id.split('-');
$('a.active').removeClass('active');
$(this).addClass('active');
$("#menu-container .content").slideUp('slow');
$("#menu-container #menu-"+id[1]).slideDown('slow');
$("#menu-conta... |
const { config } = require('./wdio.local.dev.tools.desktop.conf')
// ============
// Capabilities
// ============
config.specs = ['./tests/specs/init.spec.js']
exports.config = config
|
import React, {useState, useEffect} from 'react';
import {StyleSheet, View, TouchableOpacity, Image, Modal} from 'react-native';
import {Button} from 'native-base';
import Toast from 'react-native-toast-message';
import {FlatGrid} from 'react-native-super-grid';
import axios from 'axios';
import {useSelector} from 'rea... |
const $ = window.$
var swup = new Swup({
animateScroll: false,
preload: false,
// plugins: [new SwupGaPlugin()]
})
Delighters.config({
start: 0.95
})
var alertCookies = {
init: function () {
this.show()
},
show: function (duration) {
$('.alert').slideDown(duration)
},
close: function (d... |
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View,Image,ImageBackground,TouchableOpacity} from 'react-native';
import { Input,Button } from 'react-native-elements';
import Icon from 'react-native-vector-icons/FontAwesome';
export default class Savings extends React.Component{
static n... |
import React, { Component } from 'react';
import './App.css';
import { Route } from 'react-router-dom';
import ShelvesList from './ShelvesList'
import BookSearch from './BookSearch'
import * as BooksAPI from './BooksAPI'
class App extends Component {
state = {
books: []
}
componentDidMount(){
const book... |
import $ from 'jquery';
$('body').css({color: 'green'});
|
import { faChevronLeft, faChevronRight } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import * as React from 'react';
import styled from 'styled-components';
import { obterMes } from '../lib/formatadorDeString';
const Div = styled.div`
display: grid;... |
'use strict';
/* Controllers */
angular.module('ssApp.controllers')
.controller('homeController', function($scope, $routeParams, $location, $route) {
$scope.cities = [
{'class': 'ny', 'name': 'Devs', 'endpoint' :'nyc'},
{'class': 'au', 'name': 'Designers', 'endpoint' :'atx' },
{'class': '... |
var MenuItem = require('./MenuItem').MenuItem;
var config = require('./config');
var Hamburger = function (size, stuffing) {
MenuItem.call(this, size);
this.size = size;
this.stuffing = stuffing;
this.price += stuffing.price;
this.calories += stuffing.calories;
}
Hamburger.prototype = Object.creat... |
const shell = require('shelljs'),
path = require('path'),
fs = require('fs');
const bdd = require('./bddUtils'),
random = require('./monkeyUtils'),
mutant = require('./mutantUtils');
const strategiesPath = path.join(process.cwd(), 'strategies');
const public = {};
/*
{
appId: Number // Id of th... |
module.exports = {
common: {
ids_cancel: "str_cancel",
ids_apply: "str_apply",
ids_note: "str_note",
ids_success: "str_success",
ids_fail: "str_fail",
ids_error: "str_error",
ids_ok: "str_ok",
ids_confirm: "str_confirm",
ids_delete: "str_delete",
ids_back: "str_back"
},
men... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.