text stringlengths 7 3.69M |
|---|
import { Design } from '@freesewing/core'
import { data } from '../data.mjs'
import { cup } from './cup.mjs'
import { neckTie } from './neck-tie.mjs'
import { bandTie } from './band-tie.mjs'
const Bee = new Design({
data,
parts: [cup, neckTie, bandTie],
})
export { cup, neckTie, bandTie, Bee }
|
import { Wrapper } from "../layout";
import SEO from "../components/seo";
import LoginMain from "../components/login";
export default function index() {
return (
<Wrapper>
<SEO pageTitle={'Login'} />
<LoginMain/>
</Wrapper>
)
}
|
/*global ODSA */
// Written by Jieun Chon
//Array-Based list introduction
$(document).ready(function() {
"use strict";
var av_name = "iteration3CON";
var interpret = ODSA.UTILS.loadConfig({
av_name: av_name
}).interpreter;
var av = new JSAV(av_name);
var arrValues = [4, 13, 6, 9, 11];
var left = 80... |
describe('PieChart', function () {
var chart;
beforeEach(function () {
chart = Ext.create('PieChart', {
chartData: {},
loadMask: false
});
});
afterEach(function () {
if (chart) {
chart.destroy();
chart = null;
}
});
... |
const { frozenTime, timeUnits, testBlock, rt } = require('./testCommon');
testBlock('hour', (t) => {
t.equal(
rt.parse('hour').getTime(),
new Date(frozenTime - timeUnits.hour).getTime()
);
t.end();
});
testBlock('hour ago', (t) => {
t.equal(
rt.parse('hour ago').getTime(),
new Date(frozenTime ... |
const express = require('express')
const bodyParser = require('body-parser')
const {createColor, getColor, listColors} = require('./dal.js')
const app = express()
app.use(bodyParser.json())
app.get('/colors', function(req,res) {
res.send(listColors())
})
app.get('/colors/:name', function(req,res) {
res.send(get... |
import styled from 'styled-components';
export const Container = styled.div`
/* width: 100vw;
height: 100vh; */
overflow-x: hidden;
`
export const DownVistos = styled.div`
height: 454px;
margin-top: 10vh;
/* text-align: center; */
background: #00A75E;
img {
width... |
import Config from '@Config/config'
import { get } from './api'
import merge from '../util/merge'
const DirectoryAPI = require('org.bristolpound.cyclos.api.directory')
const directoryAPI = new DirectoryAPI(Config.DIRECTORY)
const parseShortDisplay = fullDisplay =>
fullDisplay.includes('(') ? fullDisplay.substring(... |
import React, { Component } from 'react';
import styles from './imageFade.scss';
import { imagePath } from '../../utils/assetUtils';
import PropTypes from 'prop-types';
class ImageFade extends Component {
constructor(props) {
super(props);
this.state = {
imageSrc: this.props.data[0],
imageSrcTwo: ... |
import React, {Component} from 'react';
import {Input} from 'reactstrap'
class UploadFiles extends Component{
render(){
return(
<div>
<Input type='files' />
</div>
);
}
}
export default UploadFiles; |
/** Node.js test server
*/
var http = require('http');
var url = require('url');
var net = require('net');
var os = require("os");
var path = require("path");
var child_process = require('child_process');
var port = process.env.PORT || 6080;
var port_ssl = process.env.SSL_PORT;
var port_autodrop = process.env.POR... |
import React from "react";
import AddTodo from "../components/AddTodo";
import TodoList from "../components/TodoList";
import VisibilityFilters from "../components/VisibilityFilters";
import { HomeStyle } from "../styles";
const Home = () => (
<HomeStyle>
<h1>Todolist App</h1>
<AddTodo />
<div className... |
const loginContainer = document.getElementById('login-container'),
signinContainer = document.getElementById('signin-container'),
switchLink = document.querySelectorAll('.switch-link'),
notification = document.getElementById('notification'),
body = document.getElementsByTagName('body');
... |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
var _asyncToGenerator2 = _interopRequire... |
// Módulo criado para fazer a conversão de valores para os elementos do jogo
// Eventualmente irei fazer um jogo com temáticas diferentes
// Assim será necessário mudar apenas aqui
let listaOpcao = ["Largato","Spock","Tesoura","Papel","Pedra"]
function traduzir(num) {
return listaOpcao[num+2];
}
module.exports =... |
var paypwd = 0;
var bank_list = null;
$(function() {
var key = getCookie('key');
if (!key) {
window.location.href = WapSiteUrl + '/tmpl/member_system/login.html';
return;
}
var ref = 'gold_bean';
$.ajax({
type: 'post',
url: ApiUrl + "/index.php?act=member_property&op... |
import "./App.css";
import React, { Component } from "react";
import {Button, Badge} from "react-bootstrap";
import Graph from "./components/Graph";
const axios = require("axios");
class App extends Component {
_isMounted = false;
// Create the websocket variable and connect given the device IP from the browser u... |
// Libraries
import React from "react";
export const TextContainer = ({ users }) => {
return (
<div>
<p>Users online:</p>
{users.map(user => (
<p>{user.name}</p>
))}
</div>
);
};
export default TextContainer;
|
import React, { Component, Fragment } from "react";
import PropTypes from "prop-types";
import { Card, Feed, Input } from 'semantic-ui-react'
class Autocomplete extends Component {
static propTypes = {
suggestions: PropTypes.instanceOf(Array)
};
static defaultProps = {
suggestions: []
... |
angular.module('ngApp.termandcondition', [
'ui.router',
'ngApp.common',
'ngSanitize'
]);
|
/**
* 1 页面被打开时的时候,onShow
* 1 onShow,不同于onLoad,无法在形参上接受,option参数
* 2 判断缓存中有没有token
* 1 没有:直接跳到授权页面
* 2 有:直接往下进行
* 3 获取url上的参数type
* 4 根据tupe来决定页面的标题的数组元素,哪个别激活选中
* 5 根据type,去发送请求获取订单数据
* 6 渲染页面
* 2 点击不同的标题,重新发送请求来获取和渲染数据
*/
//引入 用来发送请求的 方法 一定要把路径补全
//request表示导入函数返回的
import { reque... |
import React, { Component } from 'react';
import {
Alert,
Button,
Card,
CardBody,
CardHeader,
Col,
Collapse,
Fade,
Form,
FormGroup,
Input,
InputGroup,
Label,
Row,
} from 'reactstrap';
export default class IPWhiteList extends Component {
constructor(props) {
super(props)
this.stat... |
$(document).ready(function(){
$("#add-user").validate({
rules:{
name:{
required: true,
minlength: 3,
maxlength: 16,
},
password:{
required: true,
minlength: 6,
maxle... |
export {PageWrapperNextToList} from '../../../generic/assets'
|
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { bindActionCreators } from 'redux';
import Item from './Item';
import {
List,
EmptyContainer,
Container,
Text,
Total,
PriceTotal,
ButtonFinsh,
TextButton,
TotalContainer,
Wapper,
} from './styles';
import * as... |
/**
* Copyright 2013 Ricard Aspeljung. All Rights Reserved.
* Last updates by Enrico Murru (2015) (http://enree.co)
* util.js
* crest
*/
var mongo = require("mongodb"),
config = module.parent.parent.exports.config,
debug = module.parent.parent.exports.debug;
var atob = require('atob')
debug("util.js is loade... |
//──────────────────────────────────────────────────────────────────────────────
// Enonic XP libs (externals not webpacked)
//──────────────────────────────────────────────────────────────────────────────
//import {toStr} from '/lib/enonic/util';
//import {getUser} from '/lib/xp/auth';
import {get as getContext} from ... |
import React, { useRef, Fragment, useState, useEffect } from 'react';
import { Popover, OverlayTrigger, Button } from 'react-bootstrap';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import {
faTimes,
faStar,
faEdit,
faTrash,
} from '@fortawesome/free-solid-svg-icons';
import { connect } fro... |
import React from 'react'
import {Slider,NewProducts, PopularProducts} from '..'
import './index.scss'
const Main = () => {
return (
<main>
<div className ='wrapper-sliders'>
<Slider/>
<NewProducts/>
<PopularProducts/>
</div>
</main>
)
}
export default Main
|
import styled from "styled-components";
export default styled.div`
position: fixed;
display: flex;
top: 15%;
bottom: 15%;
left: 20%;
right: 20%;
z-index: 1;
background-color: #fff;
@media (max-width: 1000px) {
top: 5%;
bottom: 5%;
left: 5%;
right: 5%;
}
@media (max-width: 800px) ... |
var insB= document.getElementById("insB");
function ins() {
if(insB.value=="show instructions") {
hideTable();
document.getElementById("instructions").style.display="block";
insB.value="hide instructions"; }
else if(insB.value=="hide instructions"){ document.getElementById("instructions").style.display="none"; insB.v... |
import React ,{useState}from 'react';
import {View,StyleSheet, TextInput,Alert} from 'react-native';
import {shape,string} from 'prop-types';
import CircleButton from '../components/CircleButton';
import KeyboardSafeView from '../components/KeyboardSafeView';
import firebase from 'firebase';
import {translateErrors} f... |
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const commentSchema = new Schema({
content: {
type: String
},
tweetOfReply: {
type: Schema.Types.ObjectId,
ref: "Tweet"
},
imageUrl:{
type:String
},
replyOnReply: {
status:{type:B... |
const INDEX_DATA = {
rankData: [],
data:[]
};
let c_length = 0;
(function rankInit() {
let xhttp = new XMLHttpRequest();
const url = "http://3.133.28.138:8080";
xhttp.open("GET", url + `/board/rank`, false);
xhttp.onreadystatechange = () => {
if (xhttp.status !== 200) {
c... |
const config = require('../config');
var usersApi = require("./users");
var postsApi = require("./posts");
var commentsApi = require("./comments");
var Promise = require('es6-promise').Promise;
exports.getUserData = function (userId) {
// Start parallel requests for user and posts
return Promise.all(
... |
// handler
// Handles the return data sent by the check module.
var path = require('path');
var notif = require(path.join(__dirname, 'notif'));
/**
* handle
* Handles the return data sent by check.execute
*
* example
* check.execute calls back with (null, {code: 0, ...})
* handler would see this is a return... |
/**
* Index module loader.
* Load the common requireConfig, then the app for index.html
*/
require(['requireConfig'], function (requireConfig) {
/**
* load app module dependencies and begin
*/
require(['jquery', 'backbone', 'app/app.controller'],
function ($, Backbone, AppController) {
... |
import React from "react";
import { Container } from "reactstrap";
const Fouter = () => {
return (
<div>
<footer className="pt-4 my-md-5 pt-md-5 border-top">
<Container>
<div className="row">
<div className="col-12 col-md">
<img
className="mb-2"
... |
import React from 'react';
import ReactDOM from 'react-dom';
import { Greeter } from './greeter.jsx';
ReactDOM.render(
<Greeter />,
document.querySelector('#app')
);
// import { Greeter } from './greeter.js';
// import styles from './styles.scss';
// import logo from './webpack.png';
// const greet... |
var self = this;
function initMap() {
this.unq = { lat: -34.707629, lng: -58.278222 };
this.map = new google.maps.Map(document.getElementById('map'),
{ zoom: 16, center: unq });
this.geocoder = new google.maps.Geocoder;
var locations = userGeolocation()
}
function userGeoloca... |
// Generated by CoffeeScript 1.3.3
/*
slideBaseClient-plugin-alone.js
------------------------------------------------
author: [Takeharu Oshida](http://about.me/takeharu.oshida)
version: 0.1
licence: [MIT](http://opensource.org/licenses/mit-license.php)
*/
(function() {
var alone;
alone = new sbClient.Model.Pl... |
import { notify, clear } from "../slices/notification";
const NOTIFICATION_TIMEOUT = 3000;
let timeout;
export default (store) => (next) => (action) => {
if (action.type === String(notify)) {
clearTimeout(timeout);
timeout = setTimeout(() => store.dispatch(clear()), NOTIFICATION_TIMEOUT);
}
return nex... |
import { AddMessageContainer } from "./AddMessageContainer";
import { MessagesListContainer } from "./MessagesListContainer";
import { SidebarContainer } from "./SidebarContainer";
export { SidebarContainer, MessagesListContainer, AddMessageContainer };
|
// package: bcsdk
// file: rover.proto
var rover_pb = require("./rover_pb");
var core_pb = require("./core_pb");
var grpc = require("@improbable-eng/grpc-web").grpc;
var Rover = (function () {
function Rover() {}
Rover.serviceName = "bcsdk.Rover";
return Rover;
}());
Rover.Join = {
methodName: "Join",
serv... |
exports.getters = {
getCompliantData: (state) => state.compliantData,
getCompliantHeader: (state) => state.headers,
getCompliantEditDialogState: (state) => state.compliantEditDialogState,
getCompliantError: (state) => state.compliantError,
getCompliantFileDialogState: (state) => state.compliantFileDialogState... |
export const allNotes = (notes) => Object.keys(notes).map((id) => {
return notes[id];
});
export const allNotebooks = (notebooks) => Object.keys(notebooks).map((id) => {
return notebooks[id];
});
export const allTags = (tags) => Object.keys(tags).map((id) => {
return tags[id];
});
export const allNoteTags = (t... |
// Déclarer une variable
var maVariable = 'Ma variable est déclarée';
// Déclarer une constante
const maConstante = 'Ma constante est déclarée';
// Créer une fonction
function maFonction(){
console.log('Ma fonction est crée');
}
// Le class toggle
titre.classlist.add('taille-txt');
// variable | ajouter la cl... |
import React from 'react'
import { withRouter } from 'react-router-dom'
import './MenuItem.style.css'
const MenuItem = ({ title, subtitle, color, history, linkUrl, match }) => (
<div className="col s12 m6 l4 center"
onClick={() => history.push(`${match.url}${linkUrl}`)} >
<div className={`card ${color} `} >... |
module.exports = {
webpack: (config) => {
config.node = {
fs: 'empty'
}
return config
},
header: (() => {
return [
{
// matching all API routes
source: "/api/v1/tags",
headers: [
{ key: "Access-Control-Allow-Credentials", value... |
const express = require('express');
const mongoose = require('mongoose');
const dateFormat = require('dateformat');
const router = express.Router();
const task = require('../models/task_db.js');
// get all the tasks for a a user.
router.post('/get-task',(req,res)=>{
if(req.session.user){
task.find({EMAI... |
editFunction = function (row, store) {
var editFrm = Ext.create('Ext.form.Panel', {
id: 'editFrm',
frame: true,
plain: true,
constrain: true,
autoScroll: true,
layout: 'anchor',
labelWidth: 45,
url: '/EdmNew/SaveEdmGroupNewAdd',
defaults: { an... |
import * as React from 'react';
import { Dimensions, View, FlatList, Text, TouchableOpacity, StyleSheet, ViewPropTypes } from 'react-native';
import * as PropTypes from 'prop-types';
import LinearGradient from 'react-native-linear-gradient';
import { ProgressiveImage } from 'kitsu/components/ProgressiveImage';
import {... |
/*
* External dependencies
*/
import PropTypes from 'prop-types';
/**
* WordPress dependencies
*/
const { __ } = wp.i18n;
const {
TextControl,
IconButton,
Dropdown,
} = wp.components;
class ItemAdminControlsMoveToIndex extends React.Component {
constructor(props) {
super(props);
// this.props ... |
import * as actionTypes from "./constant";
import axios from "axios";
export const actGetMovieDetailApi = (movieId) => {
return (dispatch) => {
dispatch(actGetMovieDetailRequest());
axios({
url: `https://movie0706.cybersoft.edu.vn/api/QuanLyRap/LayThongTinLichChieuPhim?MaPhim=${movieId}`,
method:... |
import React, { useState, useEffect } from 'react';
import './App.css';
import axios from 'axios';
const BeerDetail = ({ match }) => {
const [beerItem, setBeerItemState] = useState({});
console.log(match);
useEffect(() => {
const fetchOneBeer = async () => {
const beerItem = await axios.get(
`h... |
/**
* BROWSER POLYFILLS
*/
/** IE10 require all of the following polyfills. React Dom library depends on it. **/
import 'core-js/es6/map';
import 'core-js/es6/set';
import 'core-js/es6/promise';
import 'core-js/es6/object';
/** Added to support react-form-with-constraints in IE10 */
import 'core-js/es6/array';
impo... |
var data = ['请选择', '待确认', '待出库 ', '已出库', '已完成'];
function bodyonloadOrder(obj) {
var str = "";
for (var i = 0; i < data.length; i++) {
str += "<option>" + data[i] + "</option> ";
}
$("#orderstate").html(str);
var selectOrder = JSON.parse(sessionStorage.getItem("selectOrder"));
//保证返回时拿到数... |
const vagasController = require('../controllers/vagas.controller');
module.exports = app => {
app
.route('/vagas')
.get(vagasController.list)
.post(vagasController.add)
app
.route('/vagas/:id')
.get(vagasController.listById)
.put(vagasController.update)
... |
import Component from '@ember/component';
export default Component.extend({
type: "handlebars",
classNames: ['annotation', 'transition'],
classNameBindings: ['showing:visible:hidden']
});
|
import React from 'react';
import { Provider } from 'react-redux';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import { checkAuth } from './actions/auth';
import { getGenres } from './actions/homepage';
import { getProfileData } from './actions/profile';
import './App.scss';
import Dashb... |
'use strict';
var bm = require('./blockmap'),
extensions = require('./array-prototypes');
/**
* Basic skip test
*/
var items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
console.log('\n## Basic blockMap()');
console.log(items + '.blockMap(3):')
items.blockMap(3, function(val, idx, arr, meta) {
console.log(idx + ' : '... |
import React from 'react';
class ModelOptionField extends React.Component {
renderInput(){
let v = this.props.value,
d = this.props.settings,
handleChange = this.props.handleChange;
switch (d.t){
case 'i':
return (
<input className="spa... |
import React from 'react'
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
import './map.css'
let MAP = undefined;
class Map extends React.Component {
constructor(props) {
super(props);
const {lat, lng} = this.props.initialCenter;
this.state = {
currentLocation: {
lat... |
/**
* (不会修改原对象) 为对象的关键路径赋值,且在关键路径上遇到的每个对象都会生成一个新的对象
* subObj:赋予的新值,key-value对
* path:字符串或字符串数组,用于指定关键路径,路径中的每一个key(字符串)都是对象中的属性,如果指定的key不存在则会创建
*/
const deepAssignObj = (obj, subObj, path) => {
const {...newObj} = obj;
const last = makeArray(path).reduce((state, key) => {
({...state[key]} = state[key] || {}... |
'use strict';
const NotesCRUD = require('./model/note-collection');
/**
* @constructor
* Creates Note object
*/
class Note {
constructor() {
}
/**
* Runs action method for the new Note
* @function
*/
async execute(command) {
switch (command.action) {
case 'add':
return this.add(command... |
import React, { Component } from "react";
export const Footer = () => (
<footer className="footer mt-auto py-3 text-center text-secondary">
<p>
Made by{" "}
<a href="https://github.com/GsusLara" className="text-decoration-none">
<i className="fab fa-github text-primary">
{" "}
<span className="t... |
import {CHANGE_SEARCH_FIELD,
REQUEST_ROBOTS_PENDNG,
REQUEST_ROBOTS_SUCCESS,
REQUEST_ROBOTS_FAILED
} from './constants'
export const setSearchField=(text)=>({
type: CHANGE_SEARCH_FIELD,
payload: text
})
export const requestRobots =()=>(dispatch)=>{
dispatch({type:REQUEST_ROBOTS_PENDNG});
f... |
import {Component} from "react";
import React from "react";
import Dnd from "../DragAndDropTable/DragAndDropTable";
class MainView extends Component {
constructor(props) {
super(props);
this.state = {
items: [{
id: 1,
company: "Alfreds Futterkiste",
... |
$(document).ready(function () {
$("i.update-news-remove").click(function () {
$(this).parent().remove()
})
$(".attachment a").each(function () {
var text = $(this).text();
var symbol = "\\";
$(this).text(text.substring(text.lastIndexOf(symbol) + 1));
});
$("#publ... |
import { Mongo } from 'meteor/mongo';
import SimpleSchema from 'simpl-schema';
SimpleSchema.extendOptions(['autoform']);
export const Products = new Mongo.Collection('products');
Products.attachSchema(new SimpleSchema({
seller: {
type: String,
label: "Seller",
optional: false,
},
title: {
type: String,
... |
'use strict';
let path = require('path');
let Animal = require(path.join(__dirname, '.', 'animal'));
class Dragon extends Animal{
constructor() {
super();
this.name = 'Dragon'
}
battle(other){
if(other.name == 'Wearwolf'){
return false;
}
return true;
}
}
module.exports = Dragon;... |
import React from "react";
import firebase from "../firebase/firebaseUtils";
class ShowPage extends React.Component {
constructor(props) {
super(props);
this.state = {
post: {},
key: ""
};
}
componentDidMount() {
const ref = firebase
.firestore()
.collection("posts")
... |
//user:object, which has label/property/keys: which has value
const user = {
email: getEmail(),
password: getPassword(),
createdAt: getCreatedAt(),
id: getId(),
};
// adding property to objects will mutate the obj. so we want to make a copy first
// using spread makes a shallow copy
const copyOfUser = { ..... |
const myApp = angular.module('helloworld', ['ui.router']);
myApp.config(function($stateProvider) {
const helloState = {
name: 'hello',
url: '/hello',
template: '<h3>hello world!</h3>'
}
const aboutState = {
name: 'about',
url: '/about',
template: '<h3>Its the UI-Router hello world app!</... |
var Romo = function() {
this.popupStack = new RomoPopupStack();
this.parentChildElems = new RomoParentChildElems();
}
Romo.prototype.doInit = function() {
this.popupStack.doInit();
this.parentChildElems.doInit();
this.initElems(Romo.f('body'));
}
// element finders
Romo.prototype.f = function(selecto... |
import request from '@/utils/request'
export function login(data) {
return request({
url: '/users/login',
method: 'post',
data
})
}
export function register(data) {
return request({
url: '/users',
method: 'post',
data
})
}
export function getInfo() {
return request({
url: '/user... |
/**
* Dependencies
*/
const NotSupportedError = require('../errors/NotSupportedError')
/**
* Operations
*/
const operations = [
'sign',
'verify',
'encrypt',
'decrypt',
'generateKey',
'importKey'
]
/**
* SupportedAlgorithms
*/
class SupportedAlgorithms {
/**
* constructor
*/
constructor ()... |
import Vue from 'vue'
import Vuex from 'vuex'
import axios from 'axios'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
ind: 0, // 分类需要的下标
show: false, // 控制弹出层的显示和隐藏
cartList: [], // 购物车数组
},
mutations: {
changeInd(state, i) {
state.ind = i
},
... |
import React from "react";
import { string } from "prop-types";
import styled from "styled-components";
import { Link } from "react-router-dom";
import LayOut from "./LayOut";
import BackHeadWithUsername from "../middleComponents/BackHeadWithUsername";
import NavigationList from "../middleComponents/NavigationList";
im... |
/* jshint esversion: 6 */
var express = require('express');
var Application = require('../../models/application');
var BddTest = require('./models/bdd-test');
var scriptManager = require('./scriptManager');
var ObjectId = require('mongoose').Types.ObjectId;
var router = express.Router();
router.get('/bdd/:featureId... |
var express = require('express');
var router = express.Router();
// routes/index.js
var models = require('../models');
router.get('/', function(req, res, next) {
models.User.findAll().then(function(users) {
res.render('index', {
title: 'MakersBnB',
users: users
});
});
});
router.get('/bahr... |
import { injectGlobal } from 'emotion';
export const baseStyles = injectGlobal`
@import styles.css;
`;
|
function register(env) {
env.addGlobal("hubdb_table_rows", (table_id, query) => handler(env, table_id, query));
}
function handler(env, table_id, query) {
const res = env.getHubDB().find(table_id, query);
return res;
}
export {
handler,
register as default
};
|
import React, { useState } from 'react';
import axios from "axios";
import { navigate } from "@reach/router"
const Create = (props) => {
const [content, setContent] = useState("");
const [title, setTitle] = useState("");
const [important, setImportant] = useState(false);
const [dbErrors, setDBErrors] ... |
function register(env) {
env.addGlobal("get_asset_url", handler);
}
function handler(path) {
return path;
}
export {
handler,
register as default
};
|
/*const element = document.createElement('h1');
element.innerText = "Hello, platzi!";
const container = document.getElementById('app');
container.appendChild(element);
*/
/*
APUNTES:
*si se trabaja con jsx es obligatorio importar 'React'
jsx = es mucho mas legible, y es más expresivo
Expresion = se va interpretar y ... |
var express = require("express"),
app = express();
var http = require("http").Server(app);
var io = require("socket.io")(http);
var port = process.env.PORT || 3000;
var crypto = require("crypto");
app.use(express.static(__dirname + "/public"));
var roomMap = {};
var currentUsers = 0;
io.on("connection", function... |
/**
* Copyright (c) 2017 Alex Forbes and Denzil Buchner
*
* This software is released under the MIT License.
* https://opensource.org/licenses/MIT
*/
const { app, BrowserWindow, ipcMain } = require('electron')
const path = require('path')
const url = require('url')
// For hot reloading of changes
// require('el... |
var canvas, ctx, flag = false,
prevX = 0,
currX = 0,
prevY = 0,
currY = 0,
dot_flag = false;
var x = "black",
y = 2;
function initCanvas() {
canvas = document.getElementById('can');
ctx = canvas.getContext("2d");
w = canvas.width;
h = canvas.height;
$( '#can' ).on("vmous... |
Tracker.autorun(function(){
/* moved this out of the navbar code since it's independent of the UI
* it also needs to rerun when the user changes */
var user = Meteor.user();
if ( user && user.profile && user.profile.classes && !Session.get('active') ){
Session.set('active', user.profile.classes[0]);
}
... |
import Map from 'esri/Map';
import FeatureLayer from 'esri/layers/FeatureLayer';
import MapView from 'esri/views/MapView';
import PolymerController from 'app/views/PolymerView/Controller';
let map = new Map({
basemap: 'dark-gray',
layers: [
new FeatureLayer({ url: 'http://services.arcgis.com/V6ZHFr6zdgNZuVG0/a... |
/**
* Definition for a binary tree node.
* function TreeNode(val) {
* this.val = val;
* this.left = this.right = null;
* }
*/
/**
* @param {TreeNode} root
* @return {boolean}
*/
class BinaryTreeNode {
constructor(value) {
this.value = value;
this.left = null;
this.right = null;
}
i... |
// == Import npm
import React, { useEffect } from 'react';
import PropTypes from 'prop-types';
import { Link } from 'react-router-dom';
import { PlusCircle, LogOut } from 'react-feather';
// == Import
import Group from '../Group';
import DashboardStyle from './DashboardStyle';
import theme from '../../styles/theme';
... |
function validateform() {
var isValid = true;
document.getElementById("status").innerText = "";
var uname = document.getElementById("UserName").value;
var pwd = document.getElementById("Password").value;
var salt = document.getElementById("Salt").value;
var iterationcount = document.getElemen... |
const router = require("express").Router();
const path = require("path");
//path to exercise.html for adding/completing exercises
router.get("/exercise", (req, res) => { res.sendFile(path.join(__dirname, "../public/exercise.html")); });
//path to stats.html to see charts of last week's workouts
router.get("/stats", (... |
let testProblem1={
name:"Не эффектифная работа WIFI в точке кипения",
description:"Да, это действительно проблема...",
dataSets:[{id:1}],
ownerId:4,
category:[
{
id:1,
name:"Экология",
orgs:[
"Федеральная служба по гидрометеорологии и монит... |
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import Grid from 'material-ui/Grid';
import Icon from 'material-ui/Icon';
import Typography from 'material-ui/Typography';
import List, { ListItem } from 'material-ui/List';
import { withStyles, createStyleSheet } from 'material-ui/styles';
imp... |
import React from 'react';
import {connect} from 'react-redux';
import Table from './table';
const mapStateToProps = ({bodyData}) => {
return {
bodyData
}
};
export default connect(mapStateToProps)(Table);
|
import React, { useEffect, useState} from "react";
//import { Adsense } from '@ctrl/react-adsense';
import {useLocation, useHistory} from 'react-router-dom';
import Socket from '../services/socket.js';
import user from '../imgs/user.png';
import arrowUp from '../imgs/seta-up.png';
import arrowDown from '../imgs/seta-do... |
"use strict";
function NotificationException() {}
function ErrorException() {}
function primitiveMultiply(a, b) {
const rand = Math.random();
if (rand < 0.5) {
return a * b;
} else if(rand > 0.85) {
throw new ErrorException();
} else {
throw new NotificationException();
}
}
function reliableMult... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.