text stringlengths 7 3.69M |
|---|
import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import q1 from '@/components/q1'
import q2 from '@/components/q2'
import q4 from '@/components/q4'
import q7 from '@/components/q7'
Vue.use(Router)
export default new Router({
routes: [
{
path: '/',
name: 'Hom... |
import React from 'react';
import Header from './Header';
import Grid from '@material-ui/core/Grid';
import Content from './Content';
import Box from '@material-ui/core/Box';
import ContactCard from './ContactCard';
import { makeStyles } from '@material-ui/core/styles';
const useStyles = makeStyles({
hero: {
bac... |
import styled from 'styled-components/macro';
export const Button = styled.button`
border: 1px solid var(--color-golden);
border-radius: var(--size-xs);
background-color: var(--color-green);
box-shadow: 2px 2px 2px #222;
font-family: 'EB Garamond', serif;
padding: var(--size-xs);
:disabled {
backgrou... |
import React from 'react'
import {Carousel} from '3d-react-carousal';
let slides = [
<img src="https://www.junaidjamshed.com/media/weltpixel/owlcarouselslider/images/s/u/summer_gala_sale1.jpg" alt="1" />,
<img src="https://cdn.shopify.com/s/files/1/0202/5884/8822/files/Men_85f7476a-0971-480f-a2ce-6b6f51e6e3c... |
module.exports = {
presets: [
[
"@babel/react",
{
"modules": false
}
]
],
plugins: [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-classes",
"@babel/plugin-transform-arrow-functions",
"@... |
var fs = require('fs');
exports.writeLog = function(user,id,activity){
//create a file with appending function
var logFile = fs.createWriteStream('./log/userActivities.txt', {
flags: "a",
encoding: "encoding",
mode: 0744
});
logFile.write('User: '+user+" - id: "+id+' - '+ 'Activity: '+activity+'... |
class Sorteio {
constructor() {
this.nome = document.querySelector('#names');
this.resultado = document.querySelector('#resultado');
this.listaNomes = [];
}
capturarNomes(event) {
event.preventDefault();
if (this.nome.value != "" && this.listaNomes.indexOf(this.nome.value) == -... |
import Validator from "../helpers/validator";
export const FETCH_VENDORS = "FETCH_VENDORS";
export const FETCH_PRODUCTS = "FETCH_PRODUCTS";
export const FETCH_CATEGORIES = "FETCH_CATEGORIES";
export const FETCH_BRANDS = "FETCH_BRANDS";
export const FETCH_BLOGS = "FETCH_BLOGS";
export function loadFetchedVendors(vendo... |
exports.donasi = (id, KPIN BOT, corohelp, tampilTanggal, tampilWaktu, instagram, telegram, youtube, kapanbotaktif, grupch1, grupch2) => {
return `〄{ *MENU DONASI ${KPIN BOT}* }〄
ᴛᴇʀɪᴍᴀ ᴋᴀsɪʜ
*${id.split("@s.whatsapp.net")[0]}*
ᴛᴇʟᴀʜ ᴍᴇᴍʙᴜᴋᴀ ᴍᴇɴᴜ ᴅᴏɴᴀsɪ
🐼🐼
🗓*${tampilTanggal}* 🐼
⏰*${tampilWaktu}* ... |
// miniprogram/pages/placeQrcode/placeQrcode.js
Page({
/**
* 页面的初始数据
*/
data: {
imageurl: ""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getQrcode(options.id);
},
// 获取二维码信息
getQrcode(queryId) {
wx.showLoading({
title: '获取二维码中',
})
var _this = th... |
import React, { useState } from "react";
import { generatePublicUrl } from "../../../urlConfig";
import "./CartItem.css";
import Image from "../../../FormElements/Image";
import { isAuthenticated } from "../../../auth";
/**
* @author
* @function CartItem
**/
const CartItem = (props) => {
const [qty, setQty] = ... |
var sharpmap = {};
sharpmap.queue = (function () {
var queued = [], active = 0, size = 6;
function init() {
webdb.open();
webdb.createTable();
}
function process() {
if ((active >= size) || !queued.length)
return;
active++;
queued.po... |
var svg = d3.select('svg')
.append('g')
.attr('transform','translate(100,100)');
/* Your code goes here */
d3.csv("./data.csv",function(dataIn){
console.log(dataIn);
svg.selectAll('circles')
.data(dataIn)
.enter()
.append('circle')
.attr('cx',function (d) ... |
/* eslint-disable react-hooks/exhaustive-deps */
import React, { } from 'react';
import { useDispatch } from 'react-redux';
import { useSelector } from 'react-redux';
import { updateRole } from '../../../redux/userReducers';
import LoadingSpinner from '../../Helpers/LoadingSpinner';
const UsersPage = () => {
const... |
import React from 'react';
import './style.scss';
import divider from '../image/Divider.png';
import cookImg from '../image/cook.png';
import dish from '../image/dish.png';
function About() {
return (
<section id="about" className="wrapper">
<div className="section-about">
<div className="about-lef... |
import { expect } from 'chai'
import HeatMap from '../../'
describe('heatmap', () => {
it('should construct', () => {
expect(new HeatMap()).to.be.not.undefined
})
})
|
import { dbService, firebaseInstance } from "../fbInstance";
// Todo : DB 중복 제거하기
// init data on firebase
export const firebaseAPI = async ({userObj}, dbCollection, defaultData) => {
console.log(`Calling status API from ${dbCollection}`);
return await dbService.collection(dbCollection)
.where("uid", "... |
import { Get_Tasks, Delete_Task } from './ActionTypes'
import { getTasks, removeTask } from '../services/localStorage'
import { createArray } from '../utils/utils'
export const getAllTasks = () => {
const tasks = getTasks()
const taskArray = createArray(tasks)
return {
type: Get_Tasks,
tasks: taskArray,
... |
import Vue from 'vue'
import App from './App.vue'
import('@/assets/styles/index.css');
import scroll from './common/scroll.directive';
Vue.directive('scroll', scroll);
import Amplify from 'aws-amplify';
import aws_exports from './aws-exports';
Amplify.configure(aws_exports);
Vue.config.productionTip = false
new V... |
// Get Current Date
let today = new Date(); // new Date object
// now concatenate formatted output
let date = (today.getMonth()+1) + " / " + today.getDate() + " / " + today.getFullYear();
document.getElementById('currentdate').innerHTML = date;
// Defining Table
// INPUT: Get number of regular hours and the employee'... |
import React, { Component } from 'react';
import Cell from '../cell/cell.js';
import './grid.css';
const puzzle = {
"puzzle": "080032001703080002500007030050001970600709008047200050020600009800090305300820010",
"solution": "489532761713486592562917834258341976631759248947268153125673489876194325394825617"
}
class ... |
var readlineSync = require('readline-sync');
var numeroVoo = readlineSync.questionInt('Qual o número do seu vôo? ');
var fileira = readlineSync.question('Qual fileira o Sr. deseja sentar? A,B,C,D,E ou F? ');
switch(fileira){
case 'A':
console.log(`O número do seu vôo é ${numeroVoo} , fileira A.`);
... |
import React from 'react';
import TagList from 'molecules/tagList';
import { array } from '@storybook/addon-knobs';
import { withDesign } from 'storybook-addon-designs';
import mdx from './docs.mdx';
export default {
title: 'Atoms|TagList',
component: TagList,
decorators: [
withDesign,
],
parameters: {
... |
// yy-renderer
// by David Figatner
// (c) YOPEY YOPEY LLC 2017
// MIT License
// https://github.com/davidfig/update
const PIXI = require('pixi.js')
const FPS = require('yy-fps')
const Loop = require('yy-loop')
const exists = require('exists')
class Renderer
{
/**
* Wrapper for a pixi.js Renderer
* @par... |
const fs = require('fs');
fs.readFile('./directions.txt', (err, data) => {
floor = 0;
directions = data.toString().split("");
directions.map(direction => {
(direction === "(") ? floor++ : floor--;
})
}) |
import {
getValidationError,
invalidUrlError,
noTextError
} from "../src/client/js/validation"
const text1 = ""
const text2 = "Definitely not a URL"
const text3 = "http://google.com"
const text4 = "https://www.google.com/en"
const text5 = "http://www.google.com"
const text6 = "http://www.google/en"
const t... |
'use strict';
window.raf = (function(){
return function(c){setTimeout(c,1000/10);};
})();
window.DigitalClock = (function() {
//convert rgb to hsl
var rgb2hsl = function(r,g,b){
r /= 255, g /= 255, b /= 255;
var max = Math.max(r, g, b), min = Math.min(r, g, b);
var h, s, l = (max + min) / 2;
if(ma... |
function isPrefersReducedMotion() {
if (window.matchMedia) return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
return false;
}
function initProjectNav() {
var projectList = document.querySelector("#projects ul");
var move = function (direction) {
var rem = parseFloat(getComputedStyle(do... |
(function(){
function Jeu()
{
var jeu = this;
var arrierePlan = null;
var balle = null;
var terrain = null;
var joueur1 = null;
var joueur2 = null;
var vitesseBalle;
var ratioCanevasX;
var ratioCanevasY;
var canevas;
var informationCanevas;
var coordoneeJoueur1;
//Vue
var accueilVue = null;
var ... |
const ejsLib = require("ejs");
const TemplateEngine = require("./TemplateEngine");
class Ejs extends TemplateEngine {
async compile(str) {
let fn = ejsLib.compile(str, {
root: "./" + super.getInputDir(),
compileDebug: true,
filename: "./" + super.getInputDir()
});
return function(data)... |
import { allCarsTemplate } from "./allCarsTemplate.js";
import carService from "./../../services/carService.js";
async function getView(context) {
let allCars = await carService.getAll();
console.log(allCars)
let templateResult = allCarsTemplate(allCars);
context.renderView(templateResult);
}
export d... |
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
import _extends from "@babel/runtime/helpers/esm/extends";
var _excluded = ["children", "rtlEnabled"];
import { BaseInfernoComponent } from "@devextreme/vdom";
export var viewFunction = viewModel => viewModel.props.chil... |
var ext = require('./ext.js');
var data = require('./data.json');
(function(e) {
// Check for GET param 'lang'
// codes from https://github.com/khanning/scratch-arduino-extension/blob/da1ab317a215a8c1c5cda1b9db756b9edc14ba68/arduino_extension.js#L533-L541
var paramString = window.location.search.replace(/^\?|\/$... |
import React from 'react';
import * as AiIcons from 'react-icons/ai';
import * as IoIcons from 'react-icons/io';
import * as BiIcons from "react-icons/bi";
import * as TiIcons from "react-icons/ti";
import * as BsIcons from "react-icons/bs";
import * as FlatIcons from "react-icons/fc";
export const SidebarData = [
{... |
/* global gapi */
const formValuesToPayload = formValues => {
const headers = {
To: formValues.email,
Subject: formValues.subject
};
const { message } = formValues;
let payload = "";
for (const [key, value] of Object.entries(headers)) {
payload += key + ": " + value + "\r\n";
}
payload += "\r\... |
import React, { Component } from 'react';
import './App.css';
import CreateGist from './components/CreateGist/CreateGist';
import GistList from './components/GistList/GistList';
class App extends Component {
render() {
return (
<div className="App">
<header className="App-header">
<h1 c... |
var interface_c1_connector_response =
[
[ "C1ConnectorResponseBlock", "interface_c1_connector_response.html#a0473fcb0c1f2e194004fda066a2ad61a", null ],
[ "assignPublicClone:", "interface_c1_connector_response.html#a60a0cfa516fc72f39e2b5e3f4275c657", null ],
[ "getResponsePublic", "interface_c1_connector_res... |
$(function() {
let text=$("#myList").val();
let button = $("input[type=button]");
let list =$("ul");
button.on('click', function() {
list.append(`<li>${text}</li>`);
})
})
// //Geolocation
var loc=document.getElementById('myloc');
function myLocation(){
if(navigator.geolocation){
navigator.geol... |
import {getChildren} from "../src/reactImpl/dom";
describe("dom", () => {
const dom = document.createElement('dv');
dom.innerHTML = `<div><span><a>xx</a></span></div>`;
test('set _webComponentTemp for every children', () => {
const fragment = getChildren(dom);
const div = fragment.querySel... |
var urllib = require('url');
var Crawler = require('../../crawler.js').Crawler;
describe('Crawler._processRedirect method', function () {
'use strict';
var pageInfo, finalURL, response;
var crawler;
var mockURLData;
var onRedirectSpy;
var urlParseSpy;
beforeEach(function () {
crawler = new Crawler();
pag... |
import React, {useState, createContext} from "react";
export const AppContext = createContext(null);
export const AppContextProvider = ({ children }) => {
const [selectedTrack, setSelectedTrack] = useState(null)
const [loading, setIsLoading] = useState(false)
const [isPlaying, setIsPlaying] = useState(fal... |
import styled from 'styled-components'
export const StyledHeader = styled.div`
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 2em 0;
`
export const StyledLayout = styled.div`
max-width: 1560px;
min-width: 500px;
position: relative;
margin: 10em;
padding: 1em;
border: 0.2em so... |
import React, { useEffect } from 'react'
import { Text, StyleSheet } from 'react-native'
function TodoDetail(props) {
useEffect(() => {
props.navigation.setOptions({
title: props.route.params.todo.title,
})
}, [])
return (
<Text>{JSON.stringify(props.route.params.todo)}</Text>
)
}
const st... |
import React from 'react';
import './index.scss'
class TypeBox extends React.Component {
constructor() {
super()
this.state = {
list: [
{ link: "icon-banshidating", name: '多媒体数字展厅' },
{ link: "icon-logo", name: '大型水幕秀' },
{ link: "icon--", name: '大型灯光秀' },
{ link: "icon-... |
const mongoose = require('../connections/mongoose/instance');
const schema = require('../schema/topic');
module.exports = mongoose.model('topic', schema);
|
var searchData=
[
['objectlist',['ObjectList',['../de/df2/classBALL_1_1PersistenceManager.html#a17f2bfefff2e00bf012a7fa46bc017aa',1,'BALL::PersistenceManager']]],
['objectset',['ObjectSet',['../de/df2/classBALL_1_1PersistenceManager.html#a577529893993830d38c431e1b0d13a3e',1,'BALL::PersistenceManager']]],
['onelet... |
/**
* English translation for bootstrap-wysihtml5
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define('bootstrap.wysihtml5.en-US', ['jquery', 'bootstrap.wysihtml5'], factory);
} else {
// Browser globals
fac... |
export const nameInput = document.querySelector('#name');
export const jobInput = document.querySelector('#job');
export const addImageBtn = document.querySelector('.profile__button-add');
export const editProfileBtn = document.querySelector('.profile__button');
export const profileImgBtn = document.querySelector('.pr... |
'use strict'
var appDir = __dirname + '/..'
module.exports = {
appRoot: appDir,
swaggerFile: appDir + '/swagger.yaml'
}
|
// Get Current Date
let today = new Date(); // new Date object
// now concatenate formatted output
let date = (today.getMonth()+1) + " / " + today.getDate() + " / " + today.getFullYear();
document.getElementById('currentdate').innerHTML = date;
// Defining Table
// INPUT: Get an integer from the user
// PROCESSING: s... |
// a key map of allowed keys
var allowedKeys = {
37: 'left',
38: 'up',
39: 'right',
40: 'down',
65: 'a',
66: 'b'
};
// the 'official' Konami Code sequence
var konamiCode = ['up', 'up', 'down', 'down', 'left', 'right', 'left', 'right', 'b', 'a'];
// a variable to remember the 'position' the user has reache... |
/*!
* maptalks.e3 v0.4.5
* LICENSE : MIT
* (c) 2016-2017 maptalks.org
*/
/*!
* requires maptalks@^0.25.0
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('maptalks'), require('echarts')) :
typeof define === 'function' && define.amd ? defin... |
import React from 'react';
import PropTypes from 'prop-types';
import { useQuery, useSubscription } from '@apollo/client';
import Tables from '../Tables';
import { GET_LAYER, SUBSCRIBE_LAYER_UPDATE } from './requests';
const LayerTablesWithData = ({ update }) => {
const { ...initialResult } = useQuery(GET_LAYER, {... |
import RestfulDomainModel from '../../base/RestfulDomainModel'
class Model extends RestfulDomainModel {
}
export default new Model([
{ promotion_id: { name: 'ID' } },
{ gid: { name: '商品id' } },
{ image: { name: '图片' } },
{ title: { name: '名称' } },
{ price: { name: '价格' } },
{ sales: { name: '全网... |
describe('Buttons - options - buttons.titleAttr', function() {
let params;
dt.libs({
js: ['jquery', 'datatables', 'buttons'],
css: ['datatables', 'buttons']
});
describe('Functional tests', function() {
dt.html('basic');
it('Empty if no title set', function() {
$('#example').DataTable({
dom: 'Bfrti... |
let presidentArray = [];
let president1 = {
name: "Theodore Roosevelt",
bio: "Theodore Roosevelt Jr. was an American statesman, author, explorer, soldier, naturalist, and reformer who served as the 26th President of the United States from 1901 to 1909.",
img: "img/roosevelt.jpg",
from: "From: 1901",
to: "To: 1909... |
import React from 'react';
import { Button, Rate, Form, Input } from "antd";
import styles from './css/ReviewForm.module.css';
const FormComp = ({
onSubmit,
form,
isSaving,
}) => {
const onFinish = e => {
e.preventDefault();
form.validateFields((err, values) => {
if (!err) {
... |
import React, { useState, useRef, useContext } from 'react'
import Axios from 'axios'
import InputStatus from "./inputStatus"
import FormConfirmationBanner from "./formConfirmationBanner"
import greenCheckmarkIcon from "../images/icon-checkmark.svg"
import invalidIcon from "../images/icon-invalid.svg"
import playIcon ... |
import React, {Component} from 'react';
class Message extends Component {
constructor(props) {
super(props);
}
componentWillMount(){
// this.setState({
// reactJson:['div',{className:'ez-led'},'Hello, React!',React.createElement("div",{className:"ez-led"},"Hello, React!")]
// })
}
render()... |
/**
* 1.创建一个元素 p,内容 glj
* 2.将 p 插入 id 为 draft 的孩子末尾
* 3.再创建一个元素 p,内容 glj2 并插入 id 为 draft 的孩子头部
* 4.3s 后删除 glj2 所在的 p 元素
* 5.获取 glj 所在的 p 元素(两种方法)
* 6.获取 glj 的标签名
* 7.设置 glj 的属性 name 为 glj
* 8.获取 glj 的父节点
*/
const draft = document.querySelector('#draft');
const p1 = document.createElement('p');
p1... |
$(function(){
//设置foot下的当前时间
var nowtime=new Date();
var nowyear=nowtime.getFullYear();
$(".nowtime").html(nowyear);
$(".miaosha").click(function(){
$(".mask").show();
$(".tc1").show();
})
$(".close_tc").click(function(){
$(".mask").hide();
$(this).parent().hide();
})
// 弹幕
var num = 0;
func... |
import { isArray } from "util";
//import { Movie } from "./movie.model";
var Movie = require("./movie.model");
var Session = require("./session.model");
var Cinema = require("./cinema.model");
var bodyParser = require("body-parser");
var tmdb = require("./tmdb");
//Returns all movies irrespective of active sessions
e... |
/**
* @class controllers.Novidade.PopUpNovidades
* Popup contendo a lista dos módulos com descrição.
* @alteracao 04/03/2015 180419 Projeto Carlos Eduardo Santos Alves Domingos
* Criação.
*/
var args = arguments[0] || {};
/**
* @method init
* Construtor da classe.
* @alteracao 04/03/2015 180419 Projeto Carlos ... |
const db = require('../database/dbConfig.js');
module.exports = {
getUsers,
addUser,
getUserBy,
}
function getUsers() {
return db('users');
}
function addUser(user) {
return db('users')
.insert(user)
// .then(newProject => getProjectsByID(newProject[0].id));
}
function getUserBy(va... |
/*-------------------------------------------
ForcedOscillatin2D.js
強制振動
--------------------------------------------*/
var canvas; //キャンバス要素
var ctx;//コンテキスト
var dt, actTime, mass, constK, length0, disp0, amp, omega, forceE;
var gamma ;//減衰率
var X0, Y0;//表示座標原点(ピクセル単位、canvas座標)
var widthX, widthY;//... |
// harness.js contains definitions used for script testing
try {
include("harness.js");
}
catch (ex) {
// file might not exist, so don't get in a twist about it...
}
include("constants.js");
include("defaults.js");
include("string.js");
include("sleep.js");
function syncShell() {
dialogue.expect(SHELL_PROMPT);
... |
import axios from 'axios'
const _baseUrl = 'http://localhost:3100/api/'
export default {
// 带参数的post
haveParams(url,params){
return axios.post(_baseUrl+url,params)
},
// 不带参数的get
noParams(url){
return axios.get(_baseUrl+url)
},
haveParamsGet(url,params){
return axios.get(_baseUrl+url,params)
},
}; |
const http = require('http')
const server = new http.Server();
// http.Server提供的事件有:
// request:当客户端请求到来时,该事件被触发,提供两个参数req和res,表示请求和响应信息,是最常用的事件
// connection:当TCP连接建立时,该事件被触发,提供一个参数socket,是net.Socket的实例
// close:当服务器关闭时,触发事件(注意不是在用户断开连接时)
server.on('request', function (req, res) {
res.writeHead(200, {
"content... |
import React from "react";
import "./Notifications.css";
import NotificationItem from "./NotificationItem";
import { getLatestNotification } from "../utils/utils";
import closeButton from "../assets/close-icon.png";
import PropTypes from "prop-types";
import NotificationItemShape from "./NotificationItemShape";
export... |
import React, { Component,Fragment} from 'react';
import {
FenleiWrap,
FenleiNav,
FenleiNavItem,
FenleiContent,
FenleiContentItem,
Img,
Loadcontainer
} from './styledComponent'
import Animates from 'components/highorder/animates.js'
import BScroll from "better-scroll"
import Loading fro... |
/**
* @param {number[][]} grid
* @return {number}
*/
var projectionArea = function(grid) {
let top = 0,
front = 0,
side = 0;
const frontPair = [];
// TOP
grid.forEach((elem) => {
elem.forEach((val) => {
if (val > 0) {
top++;
}
});
});
// SIDE
grid.forEach((elem) => {... |
const is = require('../lib/types');
describe('Types', () => {
it('is true for arrays', () => {
const isArray = is.array([]);
expect(isArray).toEqual(true);
});
it('is false for objects', () => {
const isArray = is.array({});
expect(isArray).toEqual(false);
});
it('is true for objects', () =... |
import api from './api'
const resource = 'transactions'
export default {
placeOrder (payload) {
return api().post(`${resource}/trade`, payload)
}
}
|
var app = require('express')();
var http = require('http').Server(app);
var io = require("socket.io")(http);
var clients = [];
io.on("connection", (socket) => {
console.log("Client connected");
clients.push(socket);
socket.on('chat', message=>{
clients.forEach(client=>{
io.emit('chat', ... |
import React from "react";
import { Link, Redirect } from "react-router-dom";
import { Container, Button, Header } from "semantic-ui-react";
import AuthService from "services/api/auth.js";
export default class Logout extends React.Component {
render() {
if (AuthService.isAuthenticated) {
Auth... |
const name = document.querySelector('#name');
const title = document.querySelector('#title');
const email = document.querySelector('#email');
const meassage = document.querySelector('#message');
const contactForm = document.querySelector('form');
const submitButton = document.querySelector('input[type=submit]');
subm... |
class Point{
constructor(x,y,ratio){
this.ratio = ratio;
this.startX = 0;
this.startY = 0;
this.textX = x*1;
this.textY = -y;
this.x = parseFloat(x)*this.ratio;
this.y = parseFloat(y)*this.ratio;
this.angle = atan2(this.y,this.x);
}
drawPoint(name){
strokeWeight(10);
... |
var searchData=
[
['window',['Window',['../classWindow.html#a2e2ce3cfbd3e468d389d8a9212e7b2ac',1,'Window']]]
];
|
import React from "react";
import cn from "../../utils/classnames";
import "./Grid.css";
export function Grid({ children, columns, columnsMobile, gap }) {
const classes = cn({
grid: true,
[`grid--columns-${columns}`]: columns,
[`grid--columns-mobile-${columnsMobile}`]: columnsMobile,
[`grid--gap-${ga... |
import { Link, useHistory } from 'react-router-dom';
import { useDispatch, useSelector } from 'react-redux';
import { useFormik } from 'formik';
import * as Yup from 'yup';
import {roleChange, usernameChange} from "../../../store/actions/app";
const Sign = () => {
const dispatch = useDispatch();
const history... |
/**
* ownCloud
*
* @author Vincent Petry
* @copyright Copyright (c) 2014 Vincent Petry <pvince81@owncloud.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3... |
import streams from "../apis/streams";
import {FETCH_STREAM} from "./types";
export default (id) =>{
return async(dispatch, getState)=>{
const response = await streams.get(`/streams/${id}`);
dispatch({type: FETCH_STREAM, payload: response.data})
}
}
|
// api key for twitter go here for easier access and cleaner code
// twitter api key info
exports.twitterKeys = {
consumer_key: 'LXSloFXv2dUydjxaaX66Dxye1',
consumer_secret: 'q2MJbYSCcSsDMyMYZr5U0mnP2EfasxJqLj1MTBdoF819VpS2TT',
access_token_key: '906230281-b3owan8cdn9ggA8k4apMEESrXHgnBthAfvepsUDy',
access_toke... |
import React, { useState, useEffect } from 'react';
import styled from 'styled-components';
const SearchBox = styled.div`
display: flex;
justify-content: center;
align-items: center;
width: 250px;
height: 70px;
`
const SearchBoxContent = styled.div`
margin-top: 20px;
input {
padding: 1rem 2rem;
... |
/**
* @author Raoul Harel
* @license The MIT license (LICENSE.txt)
* @copyright 2015 Raoul Harel
* @url https://github.com/rharel/webgl-dm-voronoi
*/
/**
* The main class of the library. Responsible for initializing a drawing canvas
* (from scratch or from an existing one) and exposes an interface for creating
... |
import React, {Component} from 'react';
class Header extends Component {
render() {
return (
<header className="header">
<div className="container">
<div className="header-left">
<a className="header-item" href="#">
React
</a>
</div>
... |
module.exports = {
states: [
{
"bounds_max_lat": 35.02499,
"bounds_max_long": -84.92153,
"bounds_min_lat": 30.23092,
"bounds_min_long": -88.4862,
"code": "USA-AL",
"full_name": "Alabama",
"short_name": "AL"
},
... |
import { db } from './FirebaseConfig'
export function enableModeOffline() {
db.enablePersistence().catch(function (err) {
if (err.code == 'failed-precondition') {
console.log(
'Múltiples TABS abiertas, solo se puede habilitar la persistencia un TAB a la vez'
)
} else if (err.code == 'unim... |
const expect =require('expect');
const { generateMessage, generateLocationMessage } = require('./messages')
describe('generateMessage', () => {
it('Should generate correct message object', () => {
let from = 'senderName';
let text = 'some text body'
let res = generateMessage(from, text);
expect(res.from)... |
const cron = require('node-cron');
cron.schedule('*/5 * * * *', () => {
// parse lamoda
}); |
import React, { Component } from 'react';
import { Platform, StyleSheet, Text, View, Linking, Button } from 'react-native';
window.navigator.userAgent = 'react-native';
var io = require('socket.io-client/dist/socket.io');
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for de... |
E = "101100000111011000000110101110011101100000001010111110010101101111101011110111010111001110101001011101001100001011000000010101111101101011111011010011000010100101110101001101001010010111010101111110101011011111011000000110110000001101100001011010111110110110000000101011100101010100101110100110000101011101111010111... |
//时间轴的 滚动事件
var h = $("#timeline").height();
//1.1滚动通知
var num = 0;
function goLeft() {
//750是根据你给的尺寸,可变的
// if (num == -750) {
if (num == -180) {
num = 0;
}
num -= 1;
$("#timeline").css({
top: num
})
}
//设置滚动... |
const less = require('rollup-plugin-less');
module.exports = {
rollup(config, options) {
config.plugins.push(
less({
insert: true,
output: 'dist/style.css',
})
);
return config;
},
};
|
module.exports = function (data) {
data = data.replace(/\r/g, '');
var regex = /(\d+)\n(\d{2}:\d{2}:\d{2},\d{3}) --> (\d{2}:\d{2}:\d{2},\d{3})/g;
data = data.split(regex);
data.shift();
var items = [];
for (var i = 0; i < data.length; i += 4) {
var posText = data[i + 3].trim().replace('\n',' ').replace(... |
// gulp
const gulp = require('gulp');
// import tasks
const styles = require('./tasks/styles');
const scripts = require('./tasks/scripts');
const icons = require('./tasks/icons');
const images = require('./tasks/images');
const copy = require('./tasks/copy');
const clean = require('./tasks/clean');
const serv... |
#! /usr/bin/env node
const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');
const { generate } = require('../dist/index.cjs');
const cloneUrl = 'https://github.com/danielsogl/awesome-cordova-plugins.git';
const clonePath = 'tmp/awesome-cordova-plugins';
const rootPlugin... |
import styled from 'styled-components';
export const HeaderTitle = styled.Text`
text-align: left;
font-size: 34px;
font-weight: 600;
padding-horizontal: 15px;
padding-top: 5px;
padding-bottom: 8px;
color: #454f63;
`;
|
import { Router } from 'express';
import cadastroRoutes from './cadastro.routes';
import loginRoutes from './login.routes';
import profileRoutes from './profile.routes';
import avatarRoutes from './avatar.routes';
const router = Router();
router.use('/cadastro', cadastroRoutes);
router.use('/log', loginRoutes);
rout... |
import React from "react";
import { createMaterialBottomTabNavigator } from "react-navigation-material-bottom-tabs";
import { createStackNavigator } from "react-navigation";
import { Image } from "react-native";
import { Text, HeaderDetail } from "@app/components";
import Icon from "react-native-vector-icons/FontAwesom... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.