text stringlengths 7 3.69M |
|---|
import infoPopover from 'raw!./infoPopover.html'
export default function ($scope, $element, $templateCache, $compile, $timeout) {
'ngInject'
let ctrl = this
$scope.projectList = ctrl.projectList.map((project) => {
project.coordinate = [project.investigation.location.longitude, project.investigation.locatio... |
const usuarioLogado = true;
const contapaga = false;
//0 => false
// 1 => true
//console.log(0 == false);
//console.log("" == false);
//console.log(1 == true);
//null
//underfined
let minhaVar;
let varNull = null;
console.log(minhaVar);
console.log(varNull); |
import React from 'react'
import { Link, useParams } from 'react-router-dom'
import planets from "../../data/planets"
const Planet = () => {
const planetName = useParams()
const planet = planets.find(planet => planet.name == planetName.name)
return (
<div className="planet-info-wrapper">
<Link... |
import { PRIMITIVE_TRISTRIP } from '../../platform/graphics/constants.js';
import { BLEND_NORMAL } from '../constants.js';
import { GraphNode } from '../graph-node.js';
import { Mesh } from '../mesh.js';
import { MeshInstance } from '../mesh-instance.js';
import { BasicMaterial } from '../materials/basic-material.js';... |
import React from 'react'
import { StyleSheet, Text, View } from 'react-native'
import Router from '../App/Router'
const index = () => {
return (
<Router />
)
}
export default index
|
import { put, call, takeEvery } from 'redux-saga/effects';
import {LOGIN_REQUEST, loginSuccess, loginError } from '../actions/auth.actions';
import {SIGNUP_REQUEST, signupSuccess, signupError } from '../actions/auth.actions';
import { loginRequest, signUpRequest } from '../api/accountsApi';
import utils from "../utils"... |
import dotenv from 'dotenv';
dotenv.config();
const { env } = process;
export const { APP_PORT } = env;
export const DB_CONFIG = {
host: env.DB_HOST,
port: env.DB_PORT,
user: env.DB_USERNAME,
database: env.DB_NAME,
password: env.DB_PASSWORD,
};
|
function readText(){
let input_text = document.getElementById("text_inputtext").value;
let input_question = document.getElementById("question_field").value;
document.getElementById("predicted_answers").innerText = "Running the neural net to get your answer...\n";
runQnaModel(input_question, input_text, printAns... |
'use strict';
let express = require('express');
let router = express.Router();
let db = require('../database/model');
let util = require('./routerUtil');
/**
* 餐单管理页面
*/
router.get('/menu', function (req, res) {
if (!util.authentication(req, res)) return;
let userName = req.session.user.username;
let ... |
/* eslint-disable no-underscore-dangle */
/* eslint-disable no-restricted-syntax */
import firebase from 'firebase/app';
import 'firebase/storage';
import axios from 'axios';
import { db, updateAlgolia } from '@/auth';
import { slugify } from '@/mixins';
import {
UPDATE_ITEM,
CREATE_ITEM,
UPDATE_MAIN_IMAGE,
MU... |
const fs = require('fs')
module.exports = {
afterEnd: function (runner) {
const coverage = runner.page.evaluate(function () { return window.__coverage__ }),
path = '.nyc_output/coverage.json'
if (coverage) {
console.log('Writing coverage to: ' + path)
fs.write(p... |
var selectionsort = require("../selectionsort");
var chai = require("chai");
var expect = chai.expect;
describe ("selectionsort", function(){
it("empty array", function(){
expect(selectionsort([])).to.equal("Empty Array");
});
it("simple array", function(){
expect(selectionsort([3,2,1... |
import React, { Component } from 'react';
import { connect } from 'react-redux';
class Details extends Component {
render() {
if(!this.props.car){
return(<p>Please,choose the auto! </p>);
}
return (
<div>
<h2>{this.props.car.car}</h2>
<p>{this.props.car.speed}</p>
</div... |
require('./globals_dev.js');
require('./globals.js');
CliMgr.show();
|
'use strict';
const gulp = require('gulp');
const sass = require('gulp-sass');
const postcss = require('gulp-postcss');
const autoprefixer = require('autoprefixer');
const cssnano = require('cssnano');
const sourcemaps = require('gulp-sourcemaps');
const lost = require('lost');
const browser = require('browser-sync');... |
import { responsiveStateReducer } from 'redux-responsive'
import { combineReducers } from 'redux'
import responsiveDrawer from 'material-ui-responsive-drawer/lib/store/reducer'
import formReducer from 'redux-form/lib/reducer.js'
import persistentValues from './persistentValues/reducer'
import simpleValues from './... |
import { Pagination } from "antd";
import React from "react";
import { useDispatch, useSelector } from "react-redux";
import { FILTER_BY_PAGE } from "../../constants/filterContants";
import { PRODUCT_PAGINATION_PAGE } from "../../constants/productConstants";
import "./styles.scss";
function Paginate(props) {
const d... |
// lang form
var langForm = {};
// get btn
langForm.getBtn = function () {
return zForm.currentAjaxForm.find ( 'input[type="submit"]' );
};
// init
langForm.init = function () {
// lang form init
zForm.addAjaxHandler ({
_selector: 'form.lang', // optional
// action before sending a r... |
/**
* @module ref.js
*
*/
/**
* Class pour une référence. Une référence est une instance qui permet de gérer
* à la volée les références à d'autres fiches qui sont faites dans des textes
* (ou plus rarement des titres). Une référence possède une fiche-cible ({Fiche})
* qui correspond à l'instance {Fiche... |
/// <reference path="viewHeaders.ts" />
/// <reference path="../../core/plugins/fbsdk.d.ts" />
|
let getId = x => document.getElementById(x);
let rightBtn = getId('rightBtn');
let leftBtn = getId('leftBtn');
let slider = getId('slider');
let playBtn = getId('playBtn');
let form = document.forms['sliderDots'];
let start = 0;
let direction;
let sliderImg = document.getElementsByClassName('sliderImg');
function moveL... |
import Taro, { Component } from '@tarojs/taro';
import { View, Image } from '@tarojs/components';
import { AtList, AtListItem } from "taro-ui"
import { connect } from '@tarojs/redux';
import './index.scss';
import message_img from '../../assets/images/user/message.png';
@connect(({ login }) => ({
login
}))
export de... |
//= require_tree ./admin/utilities
//= require ./admin/modules/base_module
//= require_tree ./admin/modules
//= require ./admin/plugins/base_plugin
//= require_tree ./admin/plugins
//= require ./admin/editors/base_editor
//= require_tree ./admin/editors
//= require ./admin/models/resource
//= require_tree ./admin/m... |
import React from 'react';
import {Grid, Container, Header, Divider, Segment, Button, Icon} from 'semantic-ui-react'
class Home extends React.Component{
render(){
return(
<Segment
textAlign='center'
style={{ minHeight: 700, padding: '1em 0em' }}
... |
import React, { Fragment, useState } from "react";
const EditQuiz = ({ quiz }) => {
const [title, setTitle] = useState(quiz.title);
//edit quiz
const updateQuiz = async (e) => {
e.preventDefault();
try {
const body = { title };
const response = await fetch(`http://localhost:3000/quiz/${quiz.... |
module.exports = {
getBody: (event) => {
if (Array.isArray(event.Records) && event.Records.length) {
const { data } = JSON.parse(event.Records[0].body);
return data;
}
return JSON.parse(event.body);
}
}
|
import React, { useContext, useState } from 'react';
import { useParams, useHistory } from 'react-router-dom';
import Header from '../commons/Header';
import styled from 'styled-components/macro';
import GameContext from '../../context/GameContext';
import Input from '../commons/Input';
import { Button } from '../commo... |
/** @jsx jsx */
import { css, jsx } from "@emotion/core";
import { useMemo, useCallback } from "react";
import BorderRadiusInput from "./BorderRadiusInput";
const BorderRadiusSettingRow = ({
name,
borderRadius,
baseWidth,
onChange,
}) => {
const hName = `${name}H`;
const vName = `${name}V`;
const horizon... |
import React, {Component} from 'react';
import './WeatherIcon.css';
class WeatherIcon extends Component {
render() {
return (<div className="WeatherIcon">
<span data-icon="B" id="weather-icon"></span>
</div>);
}
}
export default WeatherIcon;
|
import { all } from 'redux-saga/effects';
import loginSaga from './login.saga';
import registrationSaga from './registration.saga';
import userSaga from './user.saga';
import shelfSaga from './shelf.saga';
import deleteSaga from './delete.saga';
// rootSaga is the primary saga.
// It bundles up all of the other sagas ... |
(function () {
'use strict';
angular.module('ShoppingListCheckOff', [])
.controller('ToBuyController', ToBuyController)
.controller('AlreadyBoughtController', AlreadyBoughtController)
.service('ShoppingListCheckOffService', ShoppingListCheckOffService);
function ShoppingListCheckOf... |
const gulp = require('gulp');
const { task } = require('gulp');
const sass = require('gulp-sass');
function style() {
// 1. where is my scss files
return gulp.src('./src/*.scss')
// 2. pass that file through sass compiler
.pipe(sass())
// 3. where do I save the compiled css?
.pipe(gulp.dest('./... |
import React from 'react'
import {
getStorage,
get,
Link,
LOGIN_STATUS,
noop,
post,
RESUME_ID,
setStorage,
withRouter,
formatDateToPast, addCommaToInt
} from '~utils'
import TextField from '~/components/TextField'
import Button from '~/components/Button'
import {
pick,
} from '~utils'
import api f... |
var compose_8c =
[
[ "ComposeRedrawData", "structComposeRedrawData.html", "structComposeRedrawData" ],
[ "MAX_ADDR_ROWS", "compose_8c.html#ae0a35f3369b4cd706f92571c89a99b34", null ],
[ "MAX_USER_HDR_ROWS", "compose_8c.html#a5d9bfff8fe9b32f6ffa8df2576ef0e88", null ],
[ "CHECK_COUNT", "compose_8c.html#a3a... |
import React, { Component } from 'react';
import ReactTable from 'react-table'
import CheckboxParent from './CheckboxParent.js'
let expandedGroups = {};
export default class TurnerReactTable extends Component {
constructor(props){
super(props)
this.state = {
searchBrand: '',
searchLocation:'',
... |
// Menu Toggle
$("#menu-toggle").click(function(e) {
e.preventDefault();
$("#wrapper").toggleClass("toggled");
});
// Slide Dropdown
$('.dropdown').on('show.bs.dropdown', function(e){
$(this).find('.dropdown-menu').first().stop(true, true).slideDown(300);
});
$('.dropdown').on('hide.bs.dropdown', function(e){
... |
/*
Should synced to client
*/
module.exports = {
CARD_STATE : {
hidden: -1,
open : 0,
closed: 1
},
GAME_TYPES : {
SINGLE : 0,
MULTIPLAYER : 1
},
GAMESTATE : {
boardNotready : -2,
waitForOpponent : -1,
play : 0,
won : 1,
... |
import React from "react"
import { Box, InputBase } from "@material-ui/core"
import { makeStyles } from "@material-ui/core/styles"
const useStyles = makeStyles(theme => ({
root: {
backgroundColor: theme.palette.common.white,
borderRadius: "3px",
padding: ".75rem 1.25rem",
},
}))
const TextInput = () ... |
(function() {
(function(root) {
(root.tome != null ? root.tome : root.tome = {}).version = '0.0.1';
module.exports = root.tome;
})(typeof global !== "undefined" && global !== null ? global : window);
}).call(this);
(function() {
tome.Event = (function() {
function Event(options) {
var _ref, _r... |
import React from 'react'
import img from "../img1.jpg"
import { MDBMask, MDBView, MDBCol } from "mdbreact";
export default function Home() {
return (
<MDBCol sm="15" >
<MDBView hover zoom>
<img
src={img}
className="img-fluid"
alt=""
/>
... |
import React from 'react';
import { Root } from 'native-base'
import { StyleSheet } from 'react-native';
import { Container, Header, Content, Body, Text, Title, Icon, ActionSheet, Form, Item, Label, Input, Button, Right } from 'native-base';
import DatePicker from 'react-native-datepicker'
import TaskProvider from '../... |
var express = require('express');
var router = express.Router();
const loggedIn = require('../middleware/loggedIn');
const postsController = require('../controllers/postsController');
const commentsController = require('../controllers/commentsController');
const votesController = require('../controllers/votesControll... |
var estiloPopup = {'maxWidth': '200','maxHeigth':'200'};
var sitios=[];
var radio;
var mark_pos = L.icon({
iconUrl: 'img/marcador-de-posicion.png',
iconSize: [35, 35],
iconAnchor: [28, 28],
popupAnchor: [-6,-20]
});
for (var i = 0; i < app.length; i++) {
L.marker([app[i]['coo... |
//var pElt = document.querySelector('p');
//pElt.style.color = 'red';
//pElt.style.margin = '50px';
//pElt.style.backgroundColor = 'blue';
var stylePara =
getComputedStyle(document.getElementById('para'));
console.log(stylePara.fontStyle);
console.log(stylePara.color);
|
let a = document.querySelector('.old')
a.classList.add('new') //COLOR CHANGES TO BLUE. |
import React, { Component } from 'react'
import { StyleSheet } from 'quantum'
import { Button } from 'bypass/ui/button'
import { ColumnLayout, RowLayout, Layout } from 'bypass/ui/layout'
import { Input } from 'bypass/ui/input'
import { Text } from 'bypass/ui/text'
import Toolbar from './Toolbar'
import Price from './Pr... |
import React from 'react'
import PropTypes from 'proptypes'
const ShopCard = (props) => {
return (
<li className="ShopCard" key={props.name}>
<div className="ShopPhoto" style={{ backgroundImage: `url(${props.photoUrl})`}}></div>
<h3>{props.name}</h3>
<p>{props.address1}<br/>{props.city}, {props... |
'use strict';
let fs = require('fs');
/**
* Adds two numbers together.
* @param {string} file The path to the file relative to test/res.
* @return {string} The file's contents.
*/
export function readResFile(file) {
const relFilePath = 'test/res/' + file;
let data = fs.readFileSync(relFilePath, 'utf8');
re... |
/* If we don’t sleep enough, we accumulate sleep debt. In this project we’ll calculate if you’re getting enough sleep each week using a sleep debt calculator.
The program will determine the actual and ideal hours of sleep for each night of the last week.
Finally, it will calculate, in hours, how far you are from your... |
// console.log('hello worldjkfksdjkafjkfhk')
// const http = require('http');
// const server = http.createServer((req, res)=>{
// res.setHeader('Content-Type', 'text/html')
// res.end('<h1>hello browser<h1/>')
// res.end('more data...')
// })
// server.listen(3000)
//express
// const exp = require('express')
... |
/*
* Copyright (C) 2021 Radix IoT LLC. All rights reserved.
*/
import dataPointTagKeySelectTemplate from './dataPointTagKeySelect.html';
import './dataPointTagKeySelect.css';
/**
* @ngdoc directive
* @name ngMango.directive:maDataPointTagKeySelect
* @restrict 'E'
* @scope
*
* @description Displays a drop down... |
var $=jQuery.noConflict();
(function($){
"use strict";
$(function(){
/*------------------------------------*\
#GLOBAL
\*------------------------------------*/
$(window).ready(function(){
footerBottom();
$('.carousel').carousel({
inter... |
import React from 'react';
import {Alert, Platform, StyleSheet, Text, View, Image, TextInput, Button, ToastAndroid} from 'react-native';
import Bananas from './utils/Bananas';
import ErrorMessage from './utils/ErrorMessage';
import firebase from 'firebase';
import LinearGradient from 'react-native-linear-gradient';
ex... |
import React from 'react';
import { Link } from 'react-router-dom';
import { connect } from 'react-redux';
import { userActions } from '../_actions';
class SocialAuthLandingPage extends React.Component {
constructor(props) {
super(props);
this.state = {
data : this.props.socialUser
... |
import React from "react";
//import any components needed
//Import your array data to from the provided data file
import { operators } from "../../../data";
const Operators = ({symbol, value}) => {
// STEP 2 - add the imported data to state
const operatorButton = "opButton";
const operatorButtonCon = "opButto... |
import React from 'react';
import { makeStyles, createStyles, Grid } from '@material-ui/core'
import "./Footer.css";
const useStyles = makeStyles((theme) =>
createStyles({
gridContainer: {
margin: 'auto'
},
gridEl: {
justifyContent: 'left'
}
})
);
... |
"use strict";
/**
Here's the list of the OS, software, and libraries I'm using
Software on Macbook Pro 17-inch, Mid 2009
-----------------------------------------
Mac OSX: 10.9.4
Node.js: 0.10.31
MongoDB: 2.6.4
Node.js libraries from package.json
-----------------------------------
async: ^0.9.0
bcrypt-nodejs: 0.0... |
// Import Major Dependencies
import React, { Component } from 'react'
import { ethers } from 'ethers';
import { Input, Form, Button, Loader } from 'semantic-ui-react'
// Import CSS Files
import './limitorder.css'
class LimitOrder extends Component {
constructor(props) {
super(props);
this.state = {
lo... |
/**
* Created by Bhanu on 27/03/2016.
*/
"use strict";
(function () {
angular
.module("profileApp")
.config(function ($routeProvider, $httpProvider, ChartJsProvider) {
$routeProvider
.when('/', {
controller: 'HomeController',
con... |
import {Cell} from "./Cell.js";
export class CellBox3 {
constructor(cellMap, state, offsetX = 0, offsetY = 0) {
if (cellMap.length !== 9) {
throw 'CellBox3 map must be 9 cells.'
}
this._cellMap = cellMap;
this._state = state;
this._offsetX = offsetX;
thi... |
//[COMMENTS]
/*
Instructions
Add the less than or equal to operator to the indicated lines so that the return statements make sense.
testLessOrEqual(0) should return "Smaller Than or Equal to 12"
testLessOrEqual(11) should return "Smaller Than or Equal to 12"
testLessOrEqual(12) should return "Smaller Than or Equal to... |
export const fa = {
nomNote: 'Fa',
nomNoteAng: 'F',
positionGraveCorde1: 1,
toutesPositions: {
noteSurCorde1: [1, 13],
noteSurCorde2: [8, 20],
noteSurCorde3: [3, 15],
noteSurCorde4: [10, 22],
noteSurCorde5: [6, 18],
noteSurCorde6: [1, 13],
}
};
export const faDiese = {
nomNote: 'Fa#... |
export default function isUndefined(x) {
return x === undefined;
};
|
'use strict';
var docomo = require('./docomo.js');
var fs = require('fs');
var buf = fs.readFileSync('sample1.png');
console.log(buf);
console.log("Read picture");
docomo.storeImg("Droid", "Sample1.png", buf, function(data, response){
console.log("Stored picture");
console.log(data);
console.log(response);
d... |
import React from 'react';
import Map from '../components/Map';
import Form from '../components/Form';
import Grid from "@material-ui/core/Grid";
const Contact = () => {
return (
<div className='Contact'>
<Grid container>
<Grid item sm={12} md={6} className="top-left">
<Form />
<... |
function init(){
var tbody = d3.select("tbody");
dataSet.forEach((sighting) => {
var row = tbody.append("tr");
Object.entries(sighting).forEach(([key, value]) => {
var cell = tbody.append("td");
cell.text(value);
});
});
}
var reset = d3.select("#reset_btn... |
export default ({
shops:[],
foodtype:[],
userinfo:[],
cartgoods:[],
shopinfo:[]
})
|
(function () {
'use strict'
window.GOVUK = window.GOVUK || {}
function WordsToAvoidHighlighter (wordsToAvoidRegexps, options) {
var $el = $(options.el)
var textareaHighlightSelector = 'span.highlight'
$.map($el, function (textarea) {
$(textarea).highlightTextarea({
color: '#FFB040',
... |
import { createActions } from 'redux-actions'
import { getUserName } from '../auth'
import { getGameName } from '../game'
import { Guesses } from '../collections'
const { receiveGuess } = createActions({
RECEIVE_GUESS: guess => guess
})
const makeGuess = guess => (dispatch, getState) =>
Guesses.child(getGameName... |
import Page from "components/Page";
export default () => {
const title = "macrame";
return (
<Page title={title}>
<h2 className="entry-title">{title}</h2>
</Page>
);
};
|
/* @flow */
import Bcrypt from 'bcrypt';
let CoBcrypt : Object = {};
CoBcrypt.genSalt = (rounds : number, seedLength : number) =>
(done : Function) => {
Bcrypt.genSalt(rounds, seedLength, done);
};
CoBcrypt.hash = (str : string, salt : string) =>
(done : Function) => {
Bcrypt.hash(str, salt, done);
... |
class DiceRoll {
constructor(quantity, successValue, reroll, valueToReRoll, failures, diceSides) {
this.quantity = quantity;
this.successValue = successValue;
this.reroll = reroll;
this.valueToReRoll = valueToReRoll;
this.failures = failures;
this.diceSides = diceSide... |
app.factory('efService', [function () {
return {
employee: {
fullname: 'nguyen van nam',
notes: 'laptrinhvien javascript',
department: 'administrator',
perkCard: true,
perkStock: false,
perkSixWeek: true,
payrollType: "none"
}
};
}]) |
const Neo4jWrapper = require('simple-neo4j-wrapper');
const async = require('async');
const { NEO4J_URL, NEO4J_USERNAME, NEO4J_PASSWORD } = require('../config');
const neo4j = new Neo4jWrapper(NEO4J_URL, NEO4J_USERNAME, NEO4J_PASSWORD);
class ContentController {}
ContentController.executeQueryAndFetchResults = (quer... |
import Skill from '../../models/Skills';
export const DELETE_SKILL = 'DELETE_SKILL';
export const CREATE_SKILL = 'CREATE_SKILL';
export const UPDATE_SKILL = 'UPDATE_SKILL';
export const SET_SKILLS = 'SET_SKILLS';
export const fetchSkills = () => {
return async (dispatch, getState) => {
// any async code you wan... |
/**
* Created by user on 24.03.15.
*/
'use strict';
angular.module('crm')
.controller('EditProcessorCtrl',function($scope, data, close, ProcessorSetup, DataStorage, Notification, $rootScope) {
$scope.modalTitle = data.modalTitle;
$scope.fieldOptions = ProcessorSetup.processorCreateEditFormFields();
if ... |
import React, { Component } from "react";
import {
View,
StyleSheet,
StatusBar,
ScrollView,
Switch,
Text,
TouchableOpacity,
TextInput,
Image,
FlatList,
AsyncStorage,
ActivityIndicator,
PanResponder,
Alert,
Dimensions
} from "react-native";
import { withNavigation, DrawerActions } from "rea... |
import React, {Component} from 'react';
import ChatBar from './ChatBar.jsx';
import MessageList from './MessageList.jsx';
import Message from './Message.jsx';
import Navbar from './Navbar.jsx';
/* Parent class state modified to delete old messages and user count */
class App extends Component {
constructor(props) ... |
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import './assets/styles... |
function randomNumber(min, max) {
return Math.random() * (max - min) + min;
}
function berry(id, by, x, y) {
this.class = 'Food'
this.isdead = false;
this.id = id;
this.radius = randomNumber(10, 15)
this.isbiome = false;
this.type = 20; //object type (animal. hill bush)
... |
require('dotenv').config();
const express = require('express');
const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken');
const usersDb = require('../data/helpers/usersHelper.js');
const notesDb = require('../data/helpers/notesHelper.js');
const logoutDb = require('../data/helpers/logoutHelper.js');
... |
import React from "react";
import { connect } from "react-redux";
import $ from "jquery"
import "./Kuserissue.scss";
class Kuserissue extends React.Component {
constructor(props) {
super(props);
this.state = {
tab:[{
text:"我发布的",
title:"我的",
i... |
module.exports = angular
.module('torrents')
.factory('Torrents', function (njrtLog, Restangular, Socket, Notification, $state, SessionService) {
var logger = njrtLog.getInstance('torrents.Torrents');
logger.debug('Torrents loaded.');
var Torrents = {};
Torrents.torrents = [];
Socket.on('connect', func... |
const puppeteer = require('puppeteer')
const notifier = require('node-notifier')
;(async () => {
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.setViewport({
width: 2000,
height: 2000,
... |
import React from 'react'
import documentsData from '../data/documents'
import SingleDocument from './SingleDocument'
import GoBack from '../components/GoBack'
const DocumentsContainer = (props) => {
return (
<div id="documentsContainer">
<GoBack backButton={props.backButton} />
{documentsData.map((d... |
/**
* Created by sungmin on 11/13/16.
*/
/*
* NAME - Object constructor function
* @param _parentElement -- HTML element in which to draw the visualization
* @param _data -- ???
*/
NAME = function(_parentElement, _data) {
this.parentElement = _parentElement;
this.data = _data;
this... |
import Vue from 'vue'
/* mixin to add boolean when component is mounted, which can be used alongside with vuetify */
export const mountedMixin = {
data () {
return {
isComponentMounted: false
}
},
mounted () {
this.isComponentMounted = true
}
}
Vue.mixin(mountedMixin)
|
import I18n from "react-native-i18n";
import en from "../locales/en";
import fi from "../locales/fi"
I18n.fallbacks=true;
I18n.translations={
en:en,
fi:fi
}
I18n.locale="en"
export default I18n; |
import sedans from "./images/icon-sedans.svg";
import suvs from "./images/icon-suvs.svg";
import luxury from "./images/icon-luxury.svg";
function App() {
return (
<div className="app-container">
<div className={"column-card-container"}>
<div className={"column-card-item"} id={"sedans"}>
... |
import clamp from "lodash/clamp";
import keys from "lodash/keys";
import omit from "lodash/omit";
import { simpleMemoize } from "./utils/generalUtils";
// COLORS
export const COLORS = {
orange: "#ee6a29",
green: "#26632d",
yellow: "#e7ea08",
red: "#a51d1a",
lightBrown: "#c4bc9d",
blue: "#57abef",
lightGr... |
const TIM = require('tim-wx-sdk');
const COS = require('cos-wx-sdk-v5');
const { seatLog } = require('./request');
class IM {
constructor({sdkAppId, userID, userSig, receivedEventCb,getMessageListCb, errorEventCb, to}) {
this.tim = null;
this.sdkAppId = sdkAppId;
this.userID = userID;
this.userSig = ... |
const Discord = require("discord.js");
const bot = new Discord.Client();
bot.on("ready", () => {
console.log(`Bot has started, with ${bot.users.size} users, in ${bot.channels.size} channels of ${bot.guilds.size} guilds.`);
bot.guilds.forEach((guild) => { //for each guild the bot is in
let defaultChannel... |
exports.seed = function(knex, Promise) {
// Deletes ALL existing entries
return knex('actions')
.truncate()
.then(function() {
// Inserts seed entries
return knex('actions').insert([
{
description: 'Inital setup',
notes: 'Add dependencies etc.',
completed: t... |
import React, { useEffect } from "react";
import { useLocation } from "react-router-dom";
import { connect } from "react-redux";
import { setIsRoomHost } from "../store/actions";
import JoinRoomTitle from "./JoinRoomTitle";
import JoinRoomContent from "./JoinRoomContent";
import "./JoinRoomPage.css";
const JoinRoomPa... |
// The overview is the first page which we see when loading up the application.
// It's based on the current default landing page for LASE. This component uses
// hooks, so read carefully.
// Imports
import React, { useContext, useReducer, useState, useEffect } from 'react';
import { View, Text, StyleSheet, Activity... |
/// <reference types="cypress" />
describe("Post Request", () => {
let titleOfPosts = new Array();
let randomTitle = Math.random().toString(36).substring(1) + Math.random().toString(36).substring(1);
it("Create a new post via /posts api", () => {
cy.request({
method: "POST",
url: "... |
/*
* This file runs screenshot comparison tasks for the homepage
*
* @package: Blueacorn hpScreenshotCompare.js
* @version: 1.0
* @Author: Blue Acorn, Inc. <code@blueacorn.com>
* @Copyright: Copyright 2015-06-26 08:11:00 Blue Acorn, Inc.
*/
//relative files paths for local testing
//import js files
phantom.page.inje... |
import React from "react";
import {Link} from "react-router-dom";
import PropTypes from "prop-types";
import {offerTypes} from "../../mocks/offers.proptypes";
const PlaceCard = (props) => {
const {properties, images, price, ratingStars, features, isFavoritesList} = props.card;
const type = props.type;
const imag... |
import styled from "styled-components";
export const Main = styled.main`
width: 100vw;
height: 80vh;
background-color: #000011;
`;
export const Container = styled.div`
width: 100vw;
height: 80vh;
display: flex;
flex-direction: column;
align-items: flex-end;
`;
export const Trip = styled.div`
width:... |
import { app, BrowserWindow } from 'electron';
import { autoUpdater } from 'electron-updater';
import logger from 'electron-log';
import { notify } from './notification.js';
logger.transports.file.level = 'warn';
autoUpdater.logger = logger;
let window;
const gotTheLock = app.requestSingleInstanceLock();
if (!gotTh... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.