text stringlengths 7 3.69M |
|---|
$(document).ready(function(){
$('#btn1').click(function(){
alert('Hello');
});
$('#btn2').click(function(){
alert('How are you');
});
$('#btn3').click(function(){
alert('These buttons work!');
});
}); |
angular.module('myModule', [])
.controller('firstController', function ($scope) {
$scope.status = false;
$scope.name = 'A';
$scope.changeStatus = function (e) {
$scope.status = !$scope.status;
$scope.name = $scope.name + $scope.status + ' ';
// 将J... |
/* eslint-disable no-underscore-dangle */
const Evilplan = require('../models/Evilplan'); // we need the Animal models, attached to this are all the mongoose methods to query or create things in our DB. eg Animal.find(), Animal.create()
// GET - /evilplans
function index(req, res) {
Evilplan.find() // finds all the ... |
var temperatures = [100,90,99,80,70,65,30,10];
for(var i = 0; i <= temperatures.length; i++) {
console.log(temperatures[i]);
}
// var playList = [
// 'I Did it My way',
// 'Respect',
// 'Imagine',
// 'Born to Run',
// 'Louie Louie'
// ]
//
// function print(message) {
// document.write(message);
// }
... |
const express = require("express");
const router = express.Router();
const getMaxLib = require("../library/getMax");
/**
* Express.js router for /getMax
*
* minimum maximum value of rt and m/z for this mzML file
*/
let getMax = router.get('/getMax', function (req, res) {
console.log("Hello, getMax!");
con... |
define(function(require, exports, module) {
var Engine = require('famous/core/Engine');
var AppView = require('views/AppView');
var mainContext = Engine.createContext();
mainContext.setPerspective(500);
var size = [window.innerWidth+2, window.innerHeight];
var appView = new AppView(size);
main... |
function Panel($target){
this.$panel =null;
this.$body = null;
this.$dimmed = null;
this.$btnClse = null;
this.init($target);
this.initEvent();
}
Panel.prototype.init = function($target){
this.$panel =$target;
this.$dimmed = this.$panel.find('.backdrop');
this.$body = $('body');
this.$btnClse = this.$panel.f... |
var judgeInfoModule = require('../app/judgeInfo');
var Report = require('../app/model/report').Report;
function showReport(studentsInfo,studentsNo){
if(judgeInfoModule.judgeStuNo(studentsNo)){
var stuInfo = getStudentInfoByStuNo(studentsInfo,studentsNo);
var report = new Report(stuInfo);
r... |
export default class Order {
constructor(name, val) {
this.name = name;
this.value = val;
}
}
|
var Request={
get_users:function () {
$.get('php4578/~micki/users').then(function (response) {
console.log(response)
});
},
get_user:function (id) {
$.get('php4578/~micki/users/'+id);
},
post:function (new_user) {
... |
import React from 'react';
import { StyleSheet, View,Image, ImageBackground,TouchableOpacity,Alert,Platform,ScrollView } from 'react-native';
import { Container ,Header, StyleProvider,Title, Form,Left,Right,Icon,Thumbnail ,Item, Input, Label,Content,List,CheckBox,Body,ListItem,Text,Button} from 'native-base';
import As... |
$(document).ready(function(){
$(".slastica-img").mouseover(function(){
var width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
if (width > 991) {
fadeInCaption($(this).attr('id'));
}
});
$(".slastica-img").mouseout(function(){
fadeOutCaption($(this).attr('id'));
});
});
function fadeInC... |
'use strict';
import request from 'supertest';
import {api} from 'freecodecamp-url-shortener';
describe('api', () => {
test('I can pass a URL as a parameter and I will receive a shortened URL in the JSON response', () =>
request(api().enable('trust proxy'))
.get('/new/http://www.google.com')
.set('H... |
import React, { Component } from 'react';
class Form extends Component {
constructor(){
super();
this.initialState = {
name: '',
type: '',
};
this.state = this.initialState;
}
render() {
const {name ,type} = this.state;
return(
<form className="form-group">... |
import React, {Component} from 'react';
import {Table, Button,Alert} from 'reactstrap';
import moment from 'moment';
// import 'react-datepicker/dist/react-datepicker.css'
// import DatePicker from 'react-datepicker';
import PopUp from '../popup'
class FutsalCourtList extends Component{
constructor(props){
... |
import Ember from 'ember';
export default Ember.Component.extend({
location: Ember.inject.service(),
click () {
var model = this.get('model');
this.get('mixpanel').trackEvent('Get itinary');
window.location = this.get('location').getDirection(model);
}
});
|
const Post = require("../models/posts");
class HomeController {
home(request, response) {
Post.find({})
.populate("user")
.exec(function(error, post) {
if (error) {
console.log("Error while fetching post");
}
return response.render("home", {
title: "Codeial... |
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
browserify: {
dev: {
files: { 'assets/js/main.js': ['build/scripts/app.js'] },
options: { debug: true }
}
},
less:{
dev... |
// import { useState, useEffect } from "react";
import useStateActions from "../hooks/useStateActions";
import { Wrapper } from "../styles/RightClickMenu.styles";
import { useSpring } from "@react-spring/web";
export default function RightClickMenu() {
const { rcm } = useStateActions();
// const [show, setShow] = ... |
import userApi from "../../../api/userApi";
import { useEffect, useState } from "react";
import ReactLoading from "react-loading";
import { fetchCourse } from "../../../redux/action/user";
import { useDispatch } from "react-redux";
import { useSelector } from "react-redux";
export default function YourCourse() {
cons... |
//adds my chrome to context menu
chrome.contextMenus.create({
"title": "Look up and save!",
"id": "save_me",
"contexts": ["all"]
});
//sends out message "SaveMe" when my extension is clicked in context menu
chrome.contextMenus.onClicked.addListener(function (info, tab) {
if (info.menuItemId == "save_me... |
export default {
'position': 'sticky',
};
|
import React, { Component } from 'react';
import '../style/form.css';
import MiniClipsBox from './MiniClipsBox.jsx';
class SearchForm extends Component {
constructor(props) {
super(props);
this.state = {
searchTerms: [],
clips: []
};
}
updateSearch = (event)... |
import React from 'react';
import PropTypes from 'prop-types';
const ItemList = ({ item, removeItem }) => (
<li>
<span>{item.text}</span>
<button className="btn-close" onClick={() => removeItem(item)}>X</button>
</li>
);
ItemList.propTypes = {
item: PropTypes.object.isRequired,
removeItem: PropTypes.f... |
/**
* 定义数据库实体
*/
import mongoose from 'mongoose'
let Schema = mongoose.Schema
let authorSchema = Schema({
_id: String,
name: String,
age: Number,
stories: [{ type: Schema.Types.ObjectId, ref: 'Story' }]
})
let storySchema = Schema({
_creator: { type: String, ref: 'Author' },
title: String,
fans: [{ typ... |
'use strict';
//Enumerados: PlayerState son los estado por los que pasa el player. Directions son las direcciones a las que se puede
//mover el player.
var map;
var cursors;
var disparanding;
var jumptimer = 0;
//GameObjects
var winZone;
var propulsion1;
var propulsion2;
var finalZone;
var finalZone2;
var platforms;
... |
import moment from 'moment'
import React from 'react'
import Currency from 'react-currency-formatter'
function Order({id,amount,amountShipping,items,timestamp,images}) {
return (
<div className='relative border rounded-md'>
<div className='flex items-center space-x-10 bg-gray-100 text-gray-600 ... |
// 教程 1 - simple-action-creator.js
//我们在上一篇的介绍中讨论了一点actions,但是呢问题来了,“action creators”(action 创造器)究竟是什么东西呢,他是怎样和 action 发生联系的呢
// 他其实非常简单下面几行代码就能解释
// 这个 “action creators” 其实就是一个 function
var actionCreator = function() {
// 创建一个 action 并将其 return
return {
type: 'AN_ACTION'
}
}
//这就完了吗??当然咯
//然而,需... |
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Navbar from './components/Navbar';
import MeetupInfo from './components/MeetupInfo';
import NextMeetups from './components/NextMeetups';
const data = {
meetupInfo:{
name: 'JakartJS',
photoURL:'',
location:... |
import React, { useState, useEffect } from 'react';
import ProductItem from './PokemonItem';
import './App.css';
import Loading from './Loading/Loading';
function getPokemon({ url }) {
return new Promise((resolve, reject) => {
fetch(url).then(res => res.json())
.then(data => {
resolve(d... |
const daysDisplay = document.getElementById('days');
const hoursDisplay = document.getElementById('hours');
const minDisplay = document.getElementById('min');
const secDisplay = document.getElementById('sec');
const button = document.getElementById('btn');
const container = document.getElementById('countdown');
funct... |
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const AbrirCajaScheme = Schema({
Restaurante: String,
monto: String
});
module.exports = mongoose.model("aperturaCaja", AbrirCajaScheme); |
import React, { Component } from 'react';
class Counter extends Component {
constructor(props) {
super(props)
this.state = {
count: 0
}
}
increment() {
// its async, so down there is executed before increment
// if we want if after, make the callback fun... |
var app = angular.module('pricing');
app.controller('ModalCtrl', [
'$scope', '$rootScope', '$element', '$http', 'title', 'close', 'tickerID', 'tickerPrice',
function($scope, $rootScope, $element, $http, title, close, tickerID, tickerPrice) {
$scope.title = title;
$scope.tickerID = tickerID;
$scope.ti... |
import Box from '../Box'
import Flex from '../Flex'
import { cleanChildren, forwardProps } from '../utils'
import Icon from '../Icon'
import Text from '../Text'
/**
* Stat Arrow options
*/
const arrowOptions = {
increase: {
name: 'triangle-up',
color: 'green.400'
},
decrease: {
name: 'triangle-down... |
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(gene... |
/// <reference types="cypress" />
context('Casos de erro', () => {
beforeEach(() => {
cy.visit('/')
})
it('Email invalido', () => {
cy.cadastro("Test Bossa","test.com.com","Va654321","Va654321",true)
cy.get('button.bbox-button.margin-top-big.bg-blue-base').click()
cy.get('.bbox-context-b... |
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsPending = {
name: 'pending',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM7 13.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1... |
'use strict';
angular.module('reports')
.service('reportsService', function(pouchDB, config) {
var db = pouchDB(config.db);
this.getDeliveryRounds = function() {
return db.query('reports/delivery-rounds')
.then(function(response) {
return response.rows.map(function(row) {
... |
const goodsDao = require("../dao/goodsDao");
const path = require("path");
const goodsUpload = require("../config/goodsUpload");
const fs = require("fs");
const goodsController = {
//商品信息
goodsInfo(req,resp){
let sendMsg;
goodsDao.searchGoods([])
.then((msg)=>{
// ... |
// This configuration extends the existing Storybook Webpack config.
// See https://storybook.js.org/configurations/custom-webpack-config/ for more info.
const excludePaths = [/node_modules/, /dist/]
module.exports = ({ config }) => {
// Use real file paths for symlinked dependencies do avoid including them multipl... |
import { Map } from 'immutable';
import {
LOAD_FREE_ACTIVITIES,
LOAD_FREE_ACTIVITIES_SUCCESS,
LOAD_FREE_ACTIVITIES_FAILURE,
GET_FREE_ACTIVITIES,
GET_FREE_ACTIVITIES_SUCCESS,
GET_FREE_ACTIVITIES_FAILURE,
GET_LINK_ACTIVITIE,
GET_LINK_ACTIVITIE_SUCCESS,
GET_LINK_ACTIVITIE_FAILURE,
ACTIVITY_ANSWER,
} from '../act... |
module.exports = {
siteMetadata: {
title: "Hablando con Máquinas",
author: "Jonay Godoy",
},
plugins: [
`gatsby-plugin-catch-links`,
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/src/pages`,
name: "pages",
},
},
{
resolve: `... |
import React from "react";
export default function About() {
return (
<div className="about" id="about">
<h1 className="dobrodosli">Welcome</h1>
<h1 className="naslov2">ABOUT US</h1>
<h2 className="podnaslov3">PHILLIP ISLAND RESTORAUNT</h2>
<hr className="crni" />
<p className="teks... |
'use strict';
angular
.module('myApp.character')
.service('characterServiceJs', Service);
angular
.module('myApp.character')
.constant('charAddress', 'http://localhost:8080/tacs2016c1/personajes');
Service.$inject = ['$rootScope', '$q', '$http', 'charAddress'];
function Service($rootScope, $q, $http... |
var combineReducers=require("redux").combineReducers;
var types=require("../../const/home/IndexTypes");
//初试的redux状态
var initState=[
{
text: 'Use Redux',
completed: false,
id: 0
}
];
var todo= function(state=initState,action){
var newState=Object.assign({},state);
switch (actio... |
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import Survey from './Survey/Survey';
import Final from './Final/Final';
import store from '../rootReducer'
import './styles.css';
class App extends Component {
render() {
return (
<Provider store={store}>
<div class... |
app.controller("flexiAttributeController",function($scope,$http) {
$scope.init = function(asJson) {
$scope.flexiAttr = asJson;
}
$scope.addFlexiAttr = function () {
$scope.flexiAttr.push({
name:"",
type:"",
value:""
});
}
});
|
/**
*
* Null 类型只有一个值的数据类型,这个特殊的值是 null
* 从逻辑角度来看, null 值表示一个空对象指针,而这也正是使用 typeof 操作符检测 null 值时会返回"object"的原因
*
* 如果定义的变量准备在将来用于保存对象,那么最好将该变量初始化为 null
*
*/
var car = null;
console.log(typeof car);
if (car != null) {
//对car对象执行某些操作
} |
/*#################################################
For: SSW 322
By: Bruno, Hayden, Madeline, Miriam, and Scott
#################################################*/
let mongoose = require('mongoose');
const BookSchema = new mongoose.Schema({
'bookID' : { type: String, default: '' },
'title' : { type: String, default... |
(function () { "use strict";
function $extend(from, fields) {
function Inherit() {} Inherit.prototype = from; var proto = new Inherit();
for (var name in fields) proto[name] = fields[name];
if( fields.toString !== Object.prototype.toString ) proto.toString = fields.toString;
return proto;
}
var Main = function() {
... |
function avaliar() {
}
|
import * as React from 'react'
import Layout from '../../common/components/Layout'
import SectionTagDetail from './section-tag-detail'
import SectionTagOthers from './section-tag-others'
import SectionPostByTags from './section-post-by-tag'
function TagDetail(props) {
const { match } = props
return (
<Layout ... |
// components/dialog/dialog.js
Component({
/**
* 组件的属性列表
*/
options: {
multipleSlots: true // 在组件定义时的选项中启用多slot支持
},
properties: {
},
/**
* 组件的初始数据
*/
data: {
act: ''
},
/**
* 组件的方法列表
*/
methods: {
show () {
this.setData({
act: 'dialog-act-in'
})
... |
function mostrar()
{
//var i;
//i=parseInt(i);
i=1;
while(i<=10)
{
console.log(i); //Presionar F12
i++;
}
}//FIN DE LA FUNCIÓN |
export const PORT = 8181;
// Local MongoDB
export const CONN_MONGODB_LOCAL = 'mongodb://localhost:27017/mongoose'; |
$(document).ready(function () {
// listar();
cargarPais();
cargarTipoDocumento();
cargarTipoPaciente();
cargarIngresoEconomico();
});
/*Limpia los campos*/
function limpiar() {
$("#txtId").val("");
$("#txtNombre").val("");
$("#txtApellido").val("");
$("#txtDocumento")... |
import {useEffect, useState} from 'react'
import Header from '../../components/Header/Header'
import './Home.css'
import axios from 'axios';
import Select from '../../components/Select/Select';
import Loader from '../../components/Spinner';
import MovieCrawl from '../../components/MovieCrawl';
import Table from '../../... |
import logo from './logo.svg'
import './App.css'
import { useDispatch, useSelector } from 'react-redux'
import { fetchPokemonsThunk } from './actions/pokeActions'
import { useEffect } from 'react'
import PokemonContainer from './components/PokemonContainer'
function App () {
const pokemons = useSelector(state => sta... |
import React, { Component } from "react";
import Coin from "../Coin/Coin";
import "./CoinFlipper.css";
const options = ["Yazı", "Tura"];
const getRandomElement = (arr) => {
const randomItem = arr[Math.floor(Math.random() * arr.length)];
return randomItem;
};
const findTotal = (arr, item) => {
const t... |
import React, { Component } from "react";
import api from "../../api";
import Search from "./Search";
import { Link } from "react-router-dom";
class Projects extends Component {
constructor(props) {
super(props);
this.state = {
technologyused: "",
projects: [],
nbOfLikes: 0,
search: "... |
/**
* Module dependencies.
*/
var $ = require('jquery')
var utils = require('./utils')
/**
* Expose `directives`.
*/
var directives = module.exports = {}
/**
* Basic directives.
*/
$.extend(directives, {
bind: function ($el, value, props) {
$el.text(this.compile(value))
},
show: function ($el, val... |
/**
*
* @author Anass Ferrak aka " TheLordA " <ferrak.anass@gmail.com>
* GitHub repo: https://github.com/TheLordA/Instagram-Clone
*
*/
const express = require("express");
const morgan = require("morgan");
const cors = require("cors");
const compression = require("compression");
const helmet = require("helmet");
... |
/*
Copyright 2015 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, so... |
import React from 'react'
const Monthselect = ({jump}) => {
return (
<select className="form-control" name="month" id="month" onChange={jump}>
<option value='0'>Jan</option>
<option value='1'>Feb</option>
<option value='2'>Mar</option>
<option value='... |
"use strict";
const assert = require("assert").strict;
const chalk = require("chalk");
const errors = require("lib/errors");
const { testLines } = require("./lib/factorio/lines");
const clusterctl = require("../clusterctl.js");
const mock = require("./mock");
describe("clusterctl", function() {
describe("formatOutp... |
var searchData=
[
['querysizeforcapheight',['querySizeForCapHeight',['../classde_1_1telekom_1_1pde_1_1codelibrary_1_1ui_1_1helpers_1_1_p_d_e_typeface.html#a91a7cbb3eaeb1593019c1ca650fc8355',1,'de::telekom::pde::codelibrary::ui::helpers::PDETypeface']]]
];
|
#!/usr/bin/env node
import 'source-map-support/register';
import * as cdk from '@aws-cdk/core';
import { BaseStack } from '../lib/base-stack';
import { IngressControllerStack } from '../lib/ingress-controller-stack';
const app = new cdk.App();
new BaseStack(app, 'EKSObservabilityBase', {});
new IngressControllerStack(... |
exports.seed = function(knex) {
return knex('steps').insert([
{
step_number: 1,
instructions: 'stir in bricks',
recipe_id: 1,
}
]);
} |
const rp = require('request-promise');
const config = require('../config/newsapi.json');
class NewsApiProvider {
constructor () {
this.API_KEY = config.api_key;
}
async getTopList (category, limit) {
let url = `${config.hostname}/top-headlines?country=pl&apiKey=${this.API_KE... |
// ---[ API ]-------------------------------------------------------------------
function mouse() {
return [MX,MY,M1,M2]
}
// ---[ MOUSE ]-----------------------------------------------------------------
var MX = -1
var MY = -1
var M1 = 0 // status -> 3210 3:down 2:held 1:up 0:none
var M2 = 0 // status -> 3210 3:do... |
export default {
name: 'themify',
mediaPlayer: {
play: 'ti-control-play',
pause: 'ti-control-pause',
volumeOff: 'ti-na',
volumeDown: 'ti-volume',
volumeUp: 'ti-volume',
settings: 'ti-settings',
speed: 'ti-dashboard',
language: 'ti-layout-media-overlay',
selected: 'ti-check',
... |
var express = require("express");
var mysql = require('mysql');
var app = express();
var controllers = require('./controller/index');
var bodyParser = require('body-parser');
var passport = require('passport');
var strategy = require('./passport/strategy');
app.use(function(req, res, next) {
... |
define([
'jquery',
'underscore',
'backbone',
'prismic',
'prismic-helper',
'prismic-configuration',
'animations',
'toolbar',
'templates',
'moment'
],
function($, _, Backbone, Prismic, Helpers, Configuration, Animations, PreviewToolbar, Templates, moment) {
var BlogRouter = Backbone.Router.extend(... |
const { Stack } = require('./Stack');
function divideBy2(number) {
var remStack = new Stack(),
rem,
binaryString = '';
while (number > 0) {
rem = Math.floor(number % 2);
remStack.push(rem);
number = Math.floor(number / 2);
}
while ( ! remStack.isEmpty()) {
binaryString += remStack.pop().toString();... |
import Header from "./views/Header"
import Footer from "./views/Footer"
import Home from "./views/Home"
import About from "./views/About"
import Map from "./views/Map"
import Teacher from "./views/Teacher"
import Teachers from "./views/Teachers"
import Class from "./views/Class"
import Classes from "./views/Classes"
im... |
const TelegramBot = require('node-telegram-bot-api');
const { TOKEN } = require('./config');
const bot = new TelegramBot(TOKEN, { polling: true });
const crawler = require('./src/crawlers/reddit');
(async () => {
bot.onText(/\/NadaPraFazer (.*)/, async (msg, match) => {
try {
const subreddits = match[1].... |
import React from "react"
import "../styling/styles.css"
import Layout from "../components/layout"
import SEO from "../components/seo"
const About = () => (
<Layout>
<SEO title="about" />
<div className="about-page-container">
<h1 className="about-title"> Hi! I'm Julien 👋 </h1>
<h3 className="... |
var express = require('express');
var app = express();
app.use('/touro', function(req, res, next){ //Middleware function to log request protocol
console.log("A request for things received at " + Date.now());
next();
});
app.get('/touro', function(req, res){ // Route handler that sends the re... |
import React, { useState } from "react";
import { useHistory } from "react-router-dom";
function SignUpForm({ setCurrentUser }) {
const API = "http://localhost:3001/"
// const [formData, setFormData] = useState({
// username: "",
// password: "",
// });
const [errors, setErrors] = useSt... |
import React from 'react';
import './App.css';
import logo from './logo.svg';
export default class Hero extends React.Component {
render (){
return(
<div class="hero is-large">
<div class="hero-body">
<div class="tile is-ancestor">
<div class="tile is-7... |
import React, { Component } from 'react';
import MyHeader from './components/Header';
import ColorChooser from './components/ColorChooser';
import './App.css';
class App extends Component {
state = {
selectedColor: '',
}
onColorChange = (event) => {
this.setState({
selectedColor: event.target.val... |
var x;
var y;
var tol;
localStorage.clear();
document.getElementById("m-inputnum-inp").value=8
allPeople()
function allPeople() {
var num = document.getElementsByTagName("input")[0];
var btn=document.getElementsByClassName("jiahao")[0]
var btn2=document.getElementsByClassName("jianhao")[0]
b... |
var fs = require('fs');
fs.readFile('input.txt', 'utf8', function(err, input) {
let entries = input.split("\n");
let answer = 0;
entries.forEach(function(entry) {
let a = parseInt(entry);
if (!isNaN(a)) {
answer += a;
}
})
console.log(answer);
});
|
const colors = {
primary: "#071e3d",
secondary: "#eaa81b",
grey: "hsl(0, 0%, 27%)",
green: "green",
defaultFont: ` -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen",
"Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif`
};
export default colors;
|
const commonDockerPrompt = (oGen) => {
return [
{
type: "input",
name: "dockerImageName",
message: "Please input your docker-image-name?",
default: "[DOCKER_IMAGE_NAME]",
},
{
type: "input",
name: "dockerOrgName",
message: "Please input your docker-org-name?",
... |
d3.queue()
.defer(d3.csv, "nationRate.csv")
.await(function(error, RateData) {
var ageSvg = d3.select("#ageSvg"),
agemargin = {top: 20, right: 150, bottom: 30, left: 160},
width = +ageSvg.attr("width") - agemargin.left - agemargin.right,
height = +ageSvg.attr("height") - agemargin.top ... |
import { KeepAwake, registerRootComponent } from 'expo';
import React from 'react';
import {StyleSheet, View} from 'react-native';
import {IsocontentNative} from 'react-isocontent-native';
if (__DEV__) {
KeepAwake.activate();
}
export default class App extends React.Component {
render() {
return (
... |
import React, {Component} from 'react'
import axios from 'axios'
import CharacterCard from '../CharacterCard/characterCard'
import apiKey from "../../config/apikey";
import apiBase from "../../config/apibase";
class Event extends Component {
constructor(props) {
super(props);
this.state = {
... |
const chalk = require('chalk')
const execa = require('execa')
const { hasYarn, request } = require('./common')
const inquirer = require('inquirer')
const registries = require('./registries')
async function ping(registry) {
await request.get(`${registry}/react/latest`)
return registry
}
let checked
let result
mod... |
import React, { lazy, Suspense, Fragment } from 'react';
import PropTypes from 'prop-types';
import { Switch, Route } from 'react-router-dom';
import { ThemeProvider } from '@material-ui/styles';
import { createTheme } from './styles/theme';
import NavBar from './modules/navbar/navbar.connector';
import Admin from '... |
const meterify = require('meterify').meterify;
const Web3 = require('web3');
const web3 = meterify(new Web3(), 'http://warringstakes.meter.io');
(async ()=>{
const receipt = await web3.eth.getBalance("0x2b6620bd4328e34b437d47b4b33a06ffa5e58c56");
console.log(receipt);
})() |
import React from 'react';
import App from './App.js';
import Login from './components/auth/login.js';
import AccountInfo from './components/profile/account/account-info.js';
import Mainpage from './components/main/main.js';
import { BrowserRouter as Router, Switch, Route, Link } from 'react-router-dom';
const Router... |
console.log("connect")
$( document ).ready(function() {
console.log( "document loaded" );
for (var i = 0; i < cool.length; i++) {
console.log(cool[i])
$("ul").append('<li>' + cool[i] + '</li>');
}
////
$( "li" ).each(function( index ) {
console.log( "hello" );
});
})
|
import React from "react";
import { Row, Col, Container } from "reactstrap";
import { connect } from "react-redux";
class Fmedicalrecords extends React.Component {
render() {
return this.props.medrec.record !== null ? (
<div className="paging">
<Container className="bordercolor3">
<Row cl... |
'use strict';
/**
* Slave Manager manages all slave connections and dispatches received tasks.
* It makes sure all tasks are executed at some point of time, even if some
* connections are lost.
*
* It exposes two methods: enqueue() and dequeue(), which are used by the
* scheduler.
*
* @constructor
* @param ar... |
import React from 'react';
import styled from 'styled-components';
import { graphql } from 'gatsby';
import Layout from '../components/Layout';
import Navigation from '../components/Navigation';
import PublicationCard from '../components/PublicationCard';
export function PublicationsNavigation() {
const links = [
... |
const Index = (props) => <div>Hello, there.</div>;
export default Index;
|
export default [
{
path: '/accounts',
name: 'accounts',
component: () => import('@/pages/accounts/Accounts'),
redirect: '/accounts/information',
children: [
{
path: 'information',
name: 'accounts.information',
compon... |
// pages/coin/index.js
const api = require('../../request/api.js')
Page({
page: 1,
pageCount: 1,
isLoading: false,
/**
* 页面的初始数据
*/
data: {
coins: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getCoinList()
},
async getCoinList () {
if (this.isLoading) {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.