text stringlengths 7 3.69M |
|---|
import React, { useEffect, useState } from 'react'
import Image from 'next/image'
import Link from 'next/link'
import { useRouter } from "next/router"
import { db, auth } from '../../utils/fire-config/firebase'
import HeadMetadata from '../../components/HeadMetadata'
import Footer from '../../components/Footer'
import ... |
import React from 'react'
import { Link } from 'react-router'
import Nav from '../components/Nav'
class Home extends React.Component {
constructor(props) {
super(props)
}
render() {
return <div>
<div id="homePage" className="row">
<div classN... |
import styled from 'styled-components'
export default styled.hr`
width: 90%;
height: 2px;
background-color: black ;
`
|
/* Promises
Understand the differences of the promise and the callback pattern to work with mongodb
Refer to 04-callbacks.js to understand the callback syntax */
const simplePromise = new Promise((resolve, reject) => {
setTimeout(() => {
// If it resolves:
// resolve('Resolved');
// If things went wrong,... |
'use strict';
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = ... |
import React, { Component } from 'react';
//competences passed as props from Cv component
let competences = [];
/*function for update cv content in the parent component(cv), passed as props from cv creation component*/
let handleChange;
/*Adding Competence component*/
class Competence extends Component {
construct... |
import React from 'react'
import Example from '../components/Example'
import { Breadcrumb } from '../snippets/snippets'
const BreadcrumbPage = () => {
const breadList = ["Home", "Projects", "Project One"]
return (
<Example>
<Breadcrumb items={ breadList } />
</Example>
)
}
... |
import { createElement, render, Component } from './toy-react.js';
class MyComponent extends Component {
constructor() {
super();
this.state = {
name: 'xuwanwan nb+',
data: 1
};
}
render() {
return (
<div>
<div>{this.state.name}<span>{this.state.data.toString()}</span><... |
require(['data','deleteTable','createTable','totalSort', 'filter','jQuery'], function (data, deleteTable, createTable, sort, filter, jQuery ){
//modify json format in data (module "data")
var books = JSON.parse(data);
var newTable = document.getElementById('newTable');
//define the amount of items displayed o... |
const fs = require('fs');
const md5 = require('js-md5');
let request = require('async-request'),
response;
function toWei(amount) {
return web3._extend.utils.toWei(amount, 'ether')
}
function fromWei(amount) {
return web3._extend.utils.fromWei(amount, 'ether')
}
const real_world_number = 2;
module.exports = as... |
import React from 'react';
import styled from 'styled-components';
import PropTypes from 'prop-types';
import Section from '../../../Layout/Section/Section';
const stepsContent = [
{
id: 1,
imgUrl:
'https://static.thumbtackstatic.com/_assets/images/release/modules/how-thumbtack-works/images/estimates.i... |
import { createStore, applyMiddleware, combineReducers } from 'redux';
import { Provider } from 'react-redux';
import { Navigation } from 'react-native-navigation';
import thunk from 'redux-thunk';
import reducers from './reducers/index';
import * as appActions from './reducers/app/actions';
const reducer = combineRedu... |
/**
* Created by mapbar_front on 2017/6/6.
*/
import React, { Component } from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { createStore } from 'redux';
import todoApp from './reducer/reducer';
import Main from "./components/Main";
const store = createStore(todoApp);
re... |
Discourse.KbGlyprob = Discourse.KbObj.extend({
// the event object as received from the store
event: '',
// a new event name that we are submitting to the store, which will handle creation of the event object
eventName: null,
// high/low
evaluation: null,
init: function() {
this.set('dataType', Di... |
describe('is-human-url', function () {
var isHumanUrl = require('..');
describe('valid', function () {
it('http://google.com', function () {
isHumanUrl('http://google.com').should.be.true;
});
it('https://google.com', function () {
isHumanUrl('https://google.com').should.be.true;
});
it('ftp://goo... |
import { combineReducers } from 'redux';
// reducers
import user from 'javascripts/store/reducers/user';
const rootReducers = combineReducers({ user });
export default rootReducers;
|
const mongoose = require('mongoose');
mongoose.set('useCreateIndex', true)
const proposalSchema = mongoose.Schema({
_id: mongoose.Schema.Types.ObjectId,
user: { type: mongoose.Schema.Types.ObjectId, required: true, ref: 'User' },
title: { type: String, required: true },
abstract: { type: Strin... |
const ajs = require('@tarapiygin/ajs-homeworks-platforms-1');
console.log(ajs.info()); |
tippy('#books-parables', {
theme: 'light-border',
arrow: false,
allowHTML: true,
placement: 'right',
touch: false,
maxWidth: 550,
interactive: true,
interactiveBorder: 1,
content: '<div class="article-component"><h1>Parables</h1><ul><li>Bach, Illusions (1977)</li><li>Bach, Jonathan L... |
import React, { useState } from 'react';
const Habit = props => {
const [alreadyDidHabit, setAlreadyDidHabit] = useState(<></>);
function handleDelete() {
props.deleteHabit(props.id);
}
function handleClick() {
if (!props.chooseHabit && !props.routineHabit) {
props.changeView('scheduledHabit');
... |
module.exports = function (req, res, next) {
if (!req.cookies.cdc_session) {
res.cookie('last_activity', new Date().getTime());
res.cookie('logged_in', false);
res.cookie('admin', false);
res.cookie('cdc_session', "Enabled");
} else {
res.cookie('last_activity', ne... |
import React, { useEffect, useState } from 'react';
import socket from '../socket/socket';
import { getCookie } from '../utils/cookies';
import { useDispatch } from 'react-redux';
import { updateUser } from '../redux/user/actionCreators';
const withSocket = (Component) => (props) => {
const [isConnected, setIsConnec... |
import styled from 'styled-components';
const Buttons = styled.div`
margin-top: 2em;
text-align: center;
`;
export const Styles = {
Buttons,
};
|
Ext.require([
'Ext.form.*'
]);
Ext.define("gigade.Vendor", {
extend: 'Ext.data.Model',
fields: [
{ name: "vendor_id", type: "string" },
{ name: "vendor_name_simple", type: "string" }]
});
var VendorStore = Ext.create('Ext.data.Store', {
model: 'gigade.Vendor',
autoLoad: true,
pr... |
import React from "react";
import styled from "styled-components/macro";
import "./App.css";
import { PlayerContext } from "./Contexts/PlayerContext";
import TranscriptSentence from "./TranscriptSentence.js";
import SearchResultTranscriptSentence from "./SearchResultTranscriptSentence.js";
import IntroSentence from ".... |
/* eslint-disable no-console */
import sass from 'gulp-sass';
import {
dest, src, watch, series,
} from 'gulp';
import autoprefixer from 'gulp-autoprefixer';
import BrowserSync from 'browser-sync';
import eslint from 'gulp-eslint';
const jasmineBrowser = require('gulp-jasmine-browser');
const browserSync = Browse... |
const passport = require("passport");
exports.isLoggedIn = (req, res, next) => {
passport.authenticate("jwt", { session: false }, (err, user) => {
if (user) {
req.user = user;
next();
} else {
const message = encodeURIComponent("로그인이 필요합니다");
res.status(403).redirect(`/?error=${messag... |
exports.up = function(knex) {
return knex.schema.createTable('videosgroups', t => {
t.string('id').primary()
t.string('key').notNull()
t.string('title').notNull()
t.float('height_ratio').notNull()
t.string('p720').notNull()
t.string('p480').notNull()
t.string('p360').notNull()
t.strin... |
export const HOME = '/home';
export const LANDING = '/';
export const NOTES = '/notes';
export const CREATE_NOTE = '/create_note';
export const VIEW_NOTE = '/view_note';
|
import React, { Component } from 'react';
import { Link, Route , Redirect} from 'react-router-dom';
import '../../src/App.css';
import axios from 'axios'
import HeaderAdmin from './adminNavbar'
import {connect} from 'react-redux'
class adminDetails extends Component{
securityAdmin(){
if(this.props.admi... |
import PropTypes from 'prop-types';
import { useState, useEffect } from 'react';
import { withTranslation } from '../../i18n';
import useSweeper, { routeSweeper } from '../../hooks/useSweeper';
const MonsterSweeperButton = ({ t, monster, size }) => {
const [active, setActive] = useState(false);
const { data: sweep... |
var owners_names_dic = {
"1":"Fer Romo",
"2":"Victor Plata",
"3":"Cesar Hdz",
"4":"Alex Falconi",
"5":"Juan Pablo",
"6":"Fer Garza",
"7":"Mau Reyna",
"8":"Ana Pau",
"9":"Karely",
"10":"Claudia F",
"11":"Fran R",
"12":"Aylin V",
"13":"Daniel G",
"14":"Eduardo D",
... |
const config = {
frequency: 10000,
botherFrequency: 3000,
drinkDate: null,
nextReminder: null,
version: '0.0.1'
};
const text = {
installWelcomeTitle: '欢迎使用喝水控!',
installWelcomeContent: '喝水喝水喝水,不喝我就烦死你!ヾ(o◕∀◕)ノ',
updateWelcomeTitle: '喝水控更新啦!',
updateWelcomeContent: '本次更新的内容有:额?我这是初版啊,怎么会提示你已经更新了呢?如果你... |
var net=require('net');
var sockets=[];
var serv=net.Server(function(socket){
sockets.push(socket);
socket.on('data',function(input){
for(var i=0;i<sockets.length;i++){
if(sockets[i]==socket)continue;//not to listen to own socket
sockets[i].write(input);
}
});
socket.on('end',function(){
var i=sockets.ind... |
$(document).ready(function(){
var doc = $(document);
var body = $("body,html");
$(window).scroll(function(){
console.log( doc.scrollTop() );
$(".menu").removeClass("active");
if ( doc.scrollTop() > 0 ) {
$(".menu_btn__text").removeClass("active");
}
else {
$(".menu_btn__text").addC... |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import axios from 'axios';
import Cookies from 'js-cookie';
import './Framemenu.css';
class SubMenu extends Component {
constructor(props) {
super(props);
this.state = { menuSwitchOn: false };
}
render() {
... |
var indexSectionsWithContent =
{
0: "abcdefghilnoprstuvw",
1: "beoprt",
2: "o",
3: "eopru",
4: "abcdefghilnoprstw",
5: "ailos",
6: "cinorsv",
7: "a",
8: "beot"
};
var indexSectionNames =
{
0: "all",
1: "classes",
2: "namespaces",
3: "files",
4: "functions",
5: "variables",
6: "typedefs"... |
"use strict";
(function() {
let currentCategory;
var alreadySelected = false;
window.onload = function() {
$("view-all").onclick = fetchCategories;
$("next").onclick = questionOrAnswer;
};
function fetchCategories() {
// use fetch HTTP request to get the categories
// call displayCategories
if (al... |
import React from "react"
import { useSelector } from "react-redux"
const Notification = () => {
const message = useSelector((state) => state.notification)
if (!message) {
return null
}
console.log("notification message", message)
return <div className={message.type}>{message.text}</div>
}
export defau... |
WMS.module("Models", function(Models, WMS, Backbone, Marionette, $, _) {
/***************************************************************************
* Dichiarazioni generiche
***************************************************************************/
var Invoice = Models.Invoice = Backbone.CollectionModel.e... |
import Navbar from '@components/Navbar';
import { ILayout, ILayoutContent, ILayoutAside, ILayoutFooter, ILayoutHeader, IContainer, IRow, IColumn } from "@inkline/inkline/src/index";
export default {
name: 'Layout',
components: {
Navbar,
ILayout,
ILayoutContent,
ILayoutAside,
... |
window.onload = function () {
document.querySelector("form").addEventListener("submit", function (event) {
event.preventDefault();
var errorMsg = "";
if (document.getElementById("lastname").value.length < 5) {
errorMsg ="Le nom doit contenir au moins 5 caractères <... |
#!/usr/bin/nodejs
fs = require('fs');
file = fs.readFileSync(process.argv[2]);
console.log(JSON.stringify(JSON.parse(file)));
|
// Team: SkyBox Studios
// Team Members:
// Nathan Bailey
// Steven Bass
// Tyler Cochran
// Adil Delawalla
// Tyler Meehan
var speed = 90;
var leftJoint : Transform;
var rightJoint : Transform;
function ActivateWings(){
leftJoint.localEulerAngles = Vector3(0,0,0);
rightJoint.localEulerAngles = Vector3(0,0,0);
}
... |
alert ("Welcome To MyQuiz")
|
/* Run */
myApp.run([
'$rootScope',
'$window',
'$location',
'$timeout',
function ($rootScope, $window, $location, $timeout) {
$rootScope.isWorking = true;
$rootScope.refId = '';
var ngApp = document.getElementById('ng-app'),
header = document.getEleme... |
const express = require('express');
const app = express();
const fs = require('fs');
const { generateControllers } = require('./src/dependency');
const serverless = require('serverless-http');
const c = generateControllers();
app.use(express.json());
console.log('here')
app.get('/', (req, res) => {
res.status(200).... |
'use strict';
import { createDevTools } from 'redux-devtools'
import LogMonitor from 'redux-devtools-log-monitor'
import DockMonitor from 'redux-devtools-dock-monitor'
import React from 'react'
import { render } from 'react-dom'
import thunk from 'redux-thunk'
import { applyMiddleware, createStore, combineReducers } ... |
import React from 'react';
import firebase from 'firebase';
import { app, db } from '../config/firebase';
import { View, ScrollView, Text, TouchableOpacity } from 'react-native';
import styles from './styles';
import TagSelector from 'react-native-tag-selector';
class CustomSettings extends React.Component {
constru... |
$(document).ready(function(e){
$(".select_option").live("change",function(e){
var object = $(this);
var _option = $(this).val();
$.post("/reportes/valueoption/",{option:_option},function(info){
object.parent().after("<p>"+info.input +"</p>");
},"json");
});
$(".new_filter_report").click(function(e){
e.p... |
const fs = require('fs');
const { assert } = require('chai');
const { Parser } = require('htmlparser2');
// use the JSON file because this file is less susceptible to merge conflicts
const { languages } = require('../components.json');
describe('Examples', function () {
const exampleFiles = new Set(fs.readdirSync(_... |
const express = require("express");
const graphqlHTTP = require("express-graphql");
const schema = require("./schema/schema");
const mongoose = require("mongoose");
const cors = require("cors");
const passport = require("passport");
const cookieSession = require("cookie-session");
require("./config/passport-setup");
c... |
// import React, {useState, useEffect} from 'react'
// import {View, Text, StatusBar, TouchableOpacity, Dimensions} from 'react-native'
// import Constants from 'expo-constants';
// import DateTimePicker from "react-native-modal-datetime-picker";
// import { FontAwesome } from '@expo/vector-icons';
// import { Schedul... |
angular.module("komGikkApp")
.factory("timeEventService", function (activityService) {
function setEventProperties(scopeData, timeEvent) {
if (timeEvent.activity.defaultType) {
switch (timeEvent.activity.defaultType) {
case 'START':
s... |
// pages/info/showInfo/showInfo.js
var app = getApp()
var common = require('../../../service/common.js')
import {
getHouseholdById
} from '../../../service/info.js'
Page({
data: {
household: {}
},
toUpdateInfo() {
const household = JSON.stringify(this.data.household)
wx.navigateTo({
url: '/pag... |
// global variables
var username = "";
var userID = "010";
// This is called with the results from from FB.getLoginStatus().
function statusChangeCallback(response) {
console.log('statusChangeCallback');
console.log(response);
// The response object is returned with a status field that lets the
// app kn... |
// Written in 2014-2016 by Dmitry Chestnykh and Devi Mandiri.
// Public domain.
(function(root, f) {
'use strict';
if (typeof module !== 'undefined' && module.exports) module.exports = f();
else if (root.nacl) root.nacl.util = f();
else {
root.nacl = {};
root.nacl.util = f();
}
}(this, function() {
... |
var child_process = require ('child_process');
var fs = require ('fs');
var config = require ('../config.js');
var rule = require('./rule.model');
var async = require('async');
var getNowFormatDate = function () {
var day = new Date();
var Year = 0;
var Month = 0;
var Day = 0;
var CurrentDate = "";
Year = d... |
import Taro, { Component } from '@tarojs/taro'
import { View, Button, Image } from '@tarojs/components'
import './index.less'
import logo from '../../assets/images/logo.jpg'
export default class Authorization extends Component {
config = {
navigationBarTitleText: '授权'
}
constructor() {
super(...argume... |
function functionWithException() {
try {
throw new Error("test exception");
}
catch (e) {
//implementation of any partial processing
//and send error to the calling code
throw e;
}
}
try {
functionWithException();
}
catch (e) {
console.log(e);
}
|
import React, { useState, useEffect } from 'react'
const CalcHooks = () => {
const [number, setNumber] = useState(0)
const [showNumber, setShowNumber] = useState(false)
return (
<>
<button onClick={() => setNumber(number + 1)}>
Click to increment by 1
<... |
export const gridOptions = {
columnDefs: [
{
headerName: "Athlete",
field: "athlete",
width: 150
},
{
headerName: "Age",
field: "age",
sortingOrder: ["asc", "desc"]
},
{
headerName: "Country",
field: "country",
width: 150
},
{
hea... |
// JavaScript - Node v8.1.3
typeOfSum = (a, b) => typeof(a + b);
|
import React from 'react';
import fire from '../Config/fire'
import { connect } from 'react-redux';
import '../CSS/Work.css';
class AdminHome extends React.Component {
constructor() {
super();
this.state = {
COUNTER: 0,
COMPANY_BLOCK_USER: [],
COMPANY_ACTIVE_U... |
import React, {Component} from 'react';
import XLSX from "xlsx";
class UploadFiles extends Component{
constructor(props){
super(props)
this.state = {
data : ''
}
}
onChange = (f) => {
// debugger
// let files = event.target.files;
var name = f.name;
console.log(name);
let re... |
const person = {
age: 28
}
person.age = 29;
console.log( person ); |
//Object property shorthand
const name = 'Arush';
const userAge = 26;
const user = {
name: name,
age: userAge,
location: 'Austin'
};
/**
* Same as code below
*/
const es6User = {
name,
age: userAge,
location: 'Austin'
};
console.log(user);
console.log(es6User);
// Object Destructuring
const product... |
const fs = require('fs');
const argv = process.argv; // shows array of each command line argument/keyword
function cat(path) {
fs.readFile(path, 'utf8', function (err, data) {
if (err) {
console.log(`Error reading ${path}: `);
console.log(` ${err}`);
process.exit(1);
}
console.log(dat... |
const path = require('path');
const glob = require('glob');
const fs = require('fs');
const webpack = require('webpack');
const C = require("./workspace.config.js");
let conf = {
mode: 'development',
devtool: 'source-map',
entry: (() => {
let entries = {};
let pts = glob.sync("./" + C.ENTRY + "/*.{js... |
import React from 'react';
import Grid from '@material-ui/core/Grid';
import Card from '@material-ui/core/Card';
import CardContent from '@material-ui/core/CardContent';
import Typography from '@material-ui/core/Typography';
import { makeStyles } from '@material-ui/core/styles';
const useStyles = makeStyles((theme) =... |
console.log('周珣睡着了'); |
'use strict'
//ZADATAK 1
function numReverse(num) {
var reverseNum = parseInt(num.toString().split('').reverse().join(''));
return reverseNum;
}
function fact(x) {
if (x < 0) {
return NaN;
}
if (x == 0 || x == 1) {
return 1;
}
return fact(x - 1) * x;
}
// ZADATAK 2
functio... |
const jwt = require('jsonwebtoken');
const { resolveContent } = require('nodemailer/lib/shared');
function confirm_signup (data, cb) {
const token_confirm_signup = jwt.sign({
exp: Math.floor(Date.now() / 1000) + (60*30),
data: data
}, process.env.SECRET);
cb(token_confirm_signup);
}
functi... |
// JavaScript Document
function convert()
{
var oprt = document.getElementById("operators").value;
var slct = document.getElementById("selectors").value;
if(slct==="b")
{ var b= parseFloat(document.getElementById("inpt").value);
if(oprt === "b")
{
document.getElementById("result").value = b;
... |
$(document).ready(function(){
$('.fas.fa-chevron-left').on('click', () => $('.carousel.carousel-slider').carousel('prev'));
$('.fas.fa-chevron-right').on('click', () => $('.carousel.carousel-slider').carousel('next'));
$('.carousel.carousel-slider').carousel({
fullWidth: true,
indicat... |
/* eslint-disable */
const pako = require('pako')
const DATATYPE = [
'null',
'miINT8',
'miUINT8',
'miINT16',
'miUINT16',
'miINT32',
'miUINT32',
'miSINGLE',
'Reserved',
'miDOUBLE',
'Reserved',
'Reserved',
'miINT64',
'miUINT64',
'miMATRIX',
'miCOMPRESSED',
... |
$("#start").on("click",function(){
game.start();
})
var questions =[{
question: "What was the first full length CGI movie?",
answers:["A Bug's Life","Monsters Inc.","Toy story","The Lion King"],
correctAnswer: "Toy Story"
},{
question: "Which of these is NOT a name of one of the Spice Girls?",
an... |
/**
* Created by hasee on 2018/1/6.
*/
Ext.define('Admin.view.players.PlayersController', {
extend: 'Admin.view.BaseViewController',
alias: 'controller.players',
requires: ['Admin.view.brand.BrandForm'],
/**
* grid的store加载
*/
loadStore:function () {
var me = this, grid = me.loo... |
import { FETCH_USERS, NEW_USER } from "../actions/types";
import { getAllUsres, postUser } from '../helpers/requstHelper';
export const fetchUsers = () => dispatch => {
return dispatch({
type: FETCH_USERS,
users: getAllUsres()
});
};
export const addNewUser = (user) => dispatch => {
retur... |
//exercise 1
var total=0
for (var num=1; num < 6; num ++) {
total=total+num;
}
console.log(total)
//exercise 2
var line = "";
do{
var play = prompt("Do You Want To Play?");
var word = prompt("Enter A Word");
line = line + " " + word;
}while (play === "yes");
console.log(line);
//exercise 3
var person = pro... |
function random_from_array(images){ //Função que gera números aletórios a partir do tamanho de images
return images[Math.floor(Math.random() * images.length)]; //Math.random() -> gera um número aleatório de 0 a 1 mas nunca seleciona o 1, a partir daí você multiplica o tamanho de images por esse número aleatório... |
const boton = document.getElementById('arrancar')
boton.addEventListener('click', ()=>{
const llanta1 = document.getElementById('llanta1')
const llanta2 = document.getElementById('llanta2')
llanta1.style.animationPlayState = 'running'
llanta2.style.animationPlayState = 'running'
}) |
import { routerRedux } from 'dva/router';
import { stringify } from 'qs';
import { fakeAccountLogin, getFakeCaptcha } from '@/services/api';
import { setAuthority } from '@/utils/authority';
// import { getPageQuery } from '@/utils/utils';
import { reloadAuthorized } from '@/utils/Authorized';
import moment from 'momen... |
let o = {};
let a = new WeakMap( [
[ o, '123' ]
] );
console.log( a.has( o ) );
|
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import '../../../assets/intro.js'
import '../../../assets/introjs.css'
import { Steps, Hints } from 'intro.js-react'
// eslint-disable-next-line valid-jsdoc
/**
* A component that leverages intro.js under the hood to provide the Hello compone... |
import React, { Component } from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import Wysiwyg from '../../components/WYSIWYG'
import Layout from '../../components/Layout'
import Footer from '../../components/Footer'
import s from './Content.css'
import { loadAllPosts } from ... |
function biggieSize(arr){
for (x=0; x<arr.length; x++){
if (0<arr[x]){
arr[x]="big";
}
}
return arr;
}
arr=[-1,3,5,-5]
console.log(biggieSize(arr));
function printLowReturnHigh(arr){
min=arr[0];
max=arr[0];
for (x=0; x<arr.length; x++){
if (min>arr[x]){
... |
debugger;
var elem = document.getElementById('tree');
var htmlStructure = {
name: 'p',
content: ' Some Text in Para',
params: 'class="green"',
subTags: [{
name: 'u',
content: ' some underlined text ',
params: '',
subTags: [
{
name: 'a',
content: '1111',
params: 'href="#"... |
import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import {BrowserRouter, Route, Redirect} from 'react-router-dom'
import Cookie from 'universal-cookie'
// Route Components
import Generic from './home/main.jsx'
const cookie = new Cookie()
export default class Router extends Component{
constr... |
function search(elements, value) {
let index = 1;
while (elements.elementAt(index) !== -1 && elements.elementAt(index) < value) {
index *= 2;
}
return binarySearch(elements, value, index / 2, index)
}
function binarySearch(list, value, low, high) {
let mid = undefined;
while (low <= ... |
import React, { Component, PropTypes } from 'react';
import { View,
Text,
StyleSheet,
Image,
TextInput,
TouchableHighlight,
ToastAndroid,
AsyncStorage
} from 'react-native';
export default class ChangeName extends Component {
static propTypes = {
uid: PropTypes.string
}
... |
import * as constants from './constants';
export function userLogin(username, password) {
return {
type: constants.LOGIN_REQUEST,
payload: {
username,
password,
},
};
}
export function userLoginSuccess(cookie, username) {
return {
type: constants.LOGIN_SUCCESS,
payload: {
c... |
const express = require('express');
const bodyParser = require('body-parser');
const cors = require('cors');
const products = require('./routes/products');
const ENV = require('dotenv')
ENV.config();
const PORT = 5000;
const app = express();
app.use(cors());
app.use(bodyParser.urlencoded({ extended: true }));
app.us... |
import React, {Component} from 'react';
import { Table, Icon, Divider } from 'antd';
import {Link} from 'react-router'
import './css/supplier.scss';
export default class AllMatt extends Component{
constructor(props){
super(props);
this.state={
data:null,
num:0,
}
... |
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Slider from "react-slick";
import { withStyles, createStyleSheet } from 'material-ui/styles';
import Typography from 'material-ui/Typography';
import {Image} from 'cloudinary-react';
import {PrevArrow, NextArrow} from '../../arrows';
co... |
import api from '../connect/api.jsx'
import daemon from './daemon.jsx'
import freeze from 'deep-freeze'
import Invalid from '../ui/page/invalid.jsx'
import package_json from '../package.json'
import React from 'react'
import {start, createTokenInfo} from '../util/index.jsx'
export default async function handshake() {
... |
// Utils
import { QColorizeMixin } from 'q-colorize-mixin'
import canRender from 'quasar/src/mixins/can-render'
import {
QSlider,
QBtn,
QTooltip,
QMenu,
QExpansionItem,
QList,
QItem,
QItemSection,
QIcon,
QSpinner,
ClosePopup,
Ripple
} from 'quasar'
const getMousePosition = function (e, type = ... |
import React, { Component } from "react";
import { Nav, NavItem, Button } from "reactstrap";
import { Blockie, EthAddress } from "rimble-ui";
class Header extends Component {
constructor(props, context) {
super(props);
const { accounts } = props.drizzleState;
this.state = {
account: accoun... |
import React from 'react';
import { connect } from 'dva';
import { Table, Popconfirm, Button } from 'antd';
import HomePlayControlBar from '../../components/HomePlayControlBar/HomePlayControlBar';
import HomePageToolBar from '../../components/HomePageToolBar/HomePageToolBar';
import HomePageSliderMenu from '../../compo... |
import React, {Component, Fragment} from 'react'
import "./Person.css"
class Person extends Component{
constructor(props){
super(props)
this.state = {
dx:0,
curFrame:0
}
this.getImage = this.getImage.bind(this);
this.nextFrame = this.nextFrame.bind(this);
setInterval(this.nextFrame, 1000/this.props... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.