text stringlengths 7 3.69M |
|---|
function currencyFormat(num){
var price = Number(num).toFixed(2);
return '$' + price;
}
function _cfr(num){
var ns = String(num);
var d = arrayIndexOf.call(ns, '.');
return num;
if(d === -1){
return num;
}else{
var offset = ns.length - (3 +(d!== -1 ? ns.length-d : 0));
return _cfr(Number(ns.substr(0,... |
import React from 'react';
import withStore from '~/hocs/withStore';
function completed(props) {
let {disabled, callback} = props;
let ICONS = props.stores.icons;
let TEXT = props.stores.textsStore;
return (
<button
className="btn btn-success"
onClick={() => callback()}
disabled={dis... |
const purchasing002 = () =>{
return (
<div>
purchasing002
</div>
)
}
export default purchasing002; |
var m = require('mithril');
module.exports = {
view: ({ attrs: { left, title, right } }) => {
return m( '.title-bar', {},
m( '.title-bar__left', left ),
m( '.title-bar__center', title ),
m( '.title-bar__right', right )
);
}
} |
// WEEK 5/ DAY 23 / SLIDE 15
var express=require('express');
// BUT A MORE DETAILED SLIDE IS ON WEEK 6/ DAY 25/ SLIDE 14
var postCtrl = require("./controllers/posts.ctrl");
var usersCtrl = require("./controllers/users.ctrl");
var catCtrl =require('./controllers/categories.ctrl');
var router = express.Router();
router... |
const iconsUndoCopy =
{
"en": {
"UNDO": {}
},
"kr": {
"UNDO": {}
},
"ch": {
"UNDO": {}
},
"jp": {
"UNDO": {}
}
}
export default iconsUndoCopy;
|
import React from 'react';
import '../Signup/style.css';
function Signup(props) {
return(
<div id="signup-wrapper">
<div id="header-signup">
<h2>Sign Up</h2>
</div>
<form id="signup-form">
<div>
<label htmlFor="firstn... |
//This is also Wonderful Exercise solved by Shahmeer
var fun = (Str,ee)=>{
nn = Str.length;
ne = "";
for(i = 0 ; i<nn ; i++){
var ne = ne.concat(ee);
}
return ne;
}
var ttt = fun("Shahmeer","s");
var ht = document.getElementById("test");
console.log(fun("Shah","s"));
console.log(nn);
|
require("@nomiclabs/hardhat-waffle");
require('dotenv').config();
module.exports = {
solidity: {
compilers: [
{
version: "0.8.0"
}
]
},
networks: {
hardhat: {
forking: {
url: process.env.ALCHEMY_URL,
blockNumber: 12431519
}
}
}
};
|
import moment from 'moment';
import sleep from 'sleep-promise';
import Db from '../../src/lib/Db';
import DynamoHelper from '../DynamoHelper';
const _ = require('lodash');
const expect = require('unexpected');
const Promise = require('bluebird');
const randomstring = require('randomstring');
const dynamoHelper = new ... |
//Get Budget Data
let budgetId = document.getElementById('budgetId').value;
axios.get(`/budget/${budgetId}/api`).then((response) => {
// Data
var data = [ response.data.foodAmount, response.data.transportationAmount, response.data.insuranceAmount, response.data.clothingAmount, response.data.entert... |
(function () {
'use strict';
angular.module('AdBase').controller('userWorkspaceController',userWorkspaceController);
userWorkspaceController.$inject = ['$scope', 'userWorkspaceService','$location','$routeParams'];
function userWorkspaceController($scope,userWorkspaceService, $location, $routeParams){... |
const TaskType = {
BUILD: "BUILD", // 构建
BUILDAndDEPLOY: "BUILDAndDEPLOY", // 构建及部署
DEV: "DEV",
PUSH: "PUSH", // 发布已打包的目录到SVN
INSTALL: "INSTALL" // 安装依赖
}
const TERMINAL_MAPS = {};
/*
* @params {String} key 项目ID
* */
export const getTerminalRefIns = (taskType, key) => {
if (!key || !taskType) {
retur... |
'use strict';
require = require("@std/esm")(module,{"esm":"js"});
const assert = require('chai').assert;
const model = require('../models/notes');
describe("Model Test", function() {
beforeEach(async function() {
try {
// console.log('beforeEach');
const keyz = await model.keylist();
// consol... |
document.querySelector('.page-loaded')
.innerText = new Date().toLocaleTimeString();
document.querySelector('.get-html-ajax')
.addEventListener('click', getHtmlAjax);
const READY_STATE_FINISHED = 4;
const HTTP_STATUS_CODE_OK = 200;
function getHtmlAjax() {
const xhr = new XMLHttpRequest();
xhr.onreadystatech... |
import React from 'react';
import vars from '../../../vars';
import BaseLayout from '../../../components/layout/Base';
import Head from '../../../components/common/Head';
import PostLayout from '../PostLayout';
import PostHero from '../PostHero';
import PostCover from '../PostCover';
import PostSections from '../PostSe... |
const winston = require('winston')
const moment = require('moment')
const { config } = winston
const messageTemplate = options => {
const d = moment().format('DD/MM/YYYY h:mm')
const level = config.addColors(options.level)
const { message = '' } = options
return `${d} - ${level}: ${message}`
}
const logger ... |
module.exports = {
defaultTitle: 'Pedro Morais',
logo: '',
author: 'Pedro Morais',
url: 'https://pedro-morais.pt',
legalName: 'Pedro Morais',
defaultDescription: 'I’m Pedro Morais and I’m a FullStack Developer!',
socialLinks: {
twitter: 'http://www.twitter.com/o_pedromorais',
github: 'https://gith... |
const childProcess = require('child_process');
const Stream = require('stream').Stream;
const util = require('util');
const which = require('which');
const memoizeAsync = require('memoizeasync');
function JpegTran(jpegTranArgs) {
Stream.call(this);
this.jpegTranArgs = jpegTranArgs;
this.writable = this.readable... |
import { black, white, blue, grey } from './colors';
import { primaryFont } from './typography';
export const theme = {
primaryColor: white[100],
secondaryColor: blue[200],
textColor: black[100],
white: white[100],
black: black[100],
headingColor: blue[300],
buttonColor: blue[100],
cardHeadingBackground: grey[... |
/**
* @author dooseong, eom
*/
/** @class editor.html Page의 Controller
* @auther EnterKey
* @version 1
* @constructor 뷰 import후 생성
* @description View를 import하고 init 하기 위한 클래스
*/
var EditorAppController = Class.extend({
editorAppMainContentView: null,
editorAppSideContentView : null,
init: function() {
this.ed... |
import React, { Component } from 'react';
import { Text, View, Image, StyleSheet, Button } from 'react-native';
import { TouchableHighlight } from 'react-native-gesture-handler';
export default class AboutScreen extends Component {
render(){
return (
<View style={styles.postContainer}>
... |
import {
GET_POSTS,
GET_POST,
POST_ERROR,
UPDATE_LIKES,
DELETE_POST,
ADD_POST,
ADD_COMMENT,
REMOVE_COMMENT
} from "./types";
import axios from 'axios'
import { setAlert } from './alert'
//get posts
export const getPosts = () => async dispatch =>{
try {
const res = await axi... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Oauth = void 0;
class Oauth {
constructor(ioauth) {
this.oauth = ioauth;
}
signup(data) {
return this.oauth.signup(data);
}
checkifexist(id) {
return this.oauth.checkifexist(id);
}
}
expo... |
const path = require(`path`)
const queryAll = require(`./gatsby/queryAll.js`)
const {
makeArtistPath,
makeRecordPath,
makeReviewPath,
} = require(`./src/utils`)
exports.createPages = async ({ actions, graphql }) => {
const { data } = await graphql(queryAll)
data.vb.allArtists.forEach(artist => {
actions... |
import Phaser from 'phaser';
export default class Dialogue extends Phaser.Scene {
constructor(selfScene, title, content, nextScene) {
super(selfScene);
this.selfScene = selfScene;
this.title = title;
this.content = content;
this.nextScene = nextScene;
this.AlertDialog = null;
}
preload()... |
import axios from 'axios'
import { CREATE_PRODUCT_FAIL, CREATE_PRODUCT_REQUEST, CREATE_PRODUCT_SUCCESS, CREATE_REVIEW_FAIL, CREATE_REVIEW_REQUEST, CREATE_REVIEW_SUCCESS, DELETE_REVIEW_FAIL, DELETE_REVIEW_REQUEST, DELETE_REVIEW_SUCCESS, GET_PRODUCTS_FAIL, GET_PRODUCTS_REQUEST, GET_PRODUCTS_SUCCESS, SINGLE_PRODUCT_FAIL, ... |
var assert = require('chai').assert;
var rules = require('../src/rules_functions.js');
describe('isDateTime rule on a number', () => {
it('should return false for 0 with a rule of yyyy-mm-dd hh:mm:ss', () => {
var result = rules.isDateTime(0, {datetime: 'yyyy-mm-dd hh:mm:ss'});
assert.equal(result, false);
});
... |
import React from 'react';
import { gql } from 'apollo-boost';
import { useQuery } from '@apollo/react-hooks';
const New = () => {
const {data, loading, error } = useQuery(gql`
{
books{
name,
id
},
authors{
name,
id
}
}
`);
console.log(data);
// debugger;
if(loading) return (<p>Loadi... |
import { useState } from "react"
import { TextField, Typography } from "@material-ui/core"
import { useDispatch } from "react-redux"
import ImageUploader from '../../ImageComponents/ImageUploader'
import { Button } from '@material-ui/core'
function MissionHistoryMultiRow(props) {
const dispatch = useDispatch();
... |
// return the nested property value if it exists,
// otherwise return undefined
Object.prototype.hash = function(string) {
var components = string.split('.');
if (components.length == 0) return null;
var currentObj = this[components[0]];
for (var i = 1; i < components.length; i++) {
if (currentObj == undefi... |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
angular.module('appAnalist').controller('anaListFinController',function($scope,$http,NgTableParams,$modal){
function getData(){
... |
import React, { Component } from 'react'
import "./App.css"
export class Task extends Component {
constructor(props) {
super(props);
this.state = {
done: false,
};
}
checkoff = () => {
this.setState({done: true})
}
render() {
return (
... |
module.exports = {
moduleNameMapper: {
'^.+\\.(css)$': '<rootDir>/config/CSSStub.js',
},
setupTestFrameworkScriptFile: './src/tests/jestSetup.js',
snapshotSerializers: ['enzyme-to-json/serializer'],
};
|
import styles from '../styles/Home.module.css'
import 'bootstrap/dist/css/bootstrap.min.css';
export function TituloBlog() {
return (
<div className={styles['titulo-blog']}>
<div className={styles["titulo-blog--nome"]}>
Seu nome
</div>
<div c... |
class addCountries {
static addContries(data,svg,projection){
let path = d3.geoPath().projection(projection);
svg.selectAll("path")
.data(data)
.enter().append("path")
.attr("d", path)
// .on("mouseover",function(d) {
// //console.log("just had a mouseover", d3.select(d));
// d3... |
// 1
function openbox() {
let display = document.getElementById("block_text").style.display;
let btn = document.getElementById("btn").innerHTML;
if (display == "none") {
document.getElementById("block_text").style.display = "block";
document.getElementById("btn").innerHTML = "Закрыть";
}... |
/* globals define */
'use strict';
define([
'lodash',
'-/logger/index.js',
'-/ext/graphql/lib/properties.js'
], (
_,
logger,
{ REPOSITORY }
) => function getRepository(config, aggregate) {
const repositoryName = _.get(aggregate, REPOSITORY);
const repositoryPath = `repositories['${repositoryName}']`;
const re... |
import {useState, useEffect} from 'react';
import {imageArray1, imageArray2} from "./imageArray.js"
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faFistRaised, faCaretSquareLeft, faCaretSquareRight } from '@fortawesome/free-solid-svg-icons';
import {faSpotify, faGithubSquare} from '@fortawe... |
/**
*
* Анализ состава тела
*
*/
import PropTypes from 'prop-types';
import React from 'react';
import BarChart from '@/components/BarChart';
import Header from './elements/Header';
import Label from './elements/Label';
import Row from './elements/Row';
const BodyCompositionAnalysis = ({ data }) => (
<div>
... |
'use strict';
import React, {Component} from 'react';
import { View, FlatList, SafeAreaView, StatusBar, Image, Text,TouchableOpacity, StyleSheet,} from 'react-native';
import {DisplayText, SubmitButton} from '../../components';
import styles from './styles';
import colors from '../../assets/colors';
import { ProgressD... |
var bcrypt = require('bcrypt-nodejs');
var bodyParser = require('body-parser');
var cookieSession = require('cookie-session');
var express = require('express');
var fs = require('fs');
var https = require('https');
var path = require('path');
var session = require('express-session');
var hashed_pass = '$2a$10$FgThzsco... |
import isNumeric from '../src/is-numeric'
isNumeric(3)
//=> true
isNumeric(Number(3))
//=> true
isNumeric(new Number(3))
//=> true
isNumeric('3')
//=> true
isNumeric('.6')
//=> true
isNumeric(NaN)
//=> false
isNumeric(Infinity)
//=> false
isNumeric(Number.POSITIVE_INFINITY)
//=> false
isNumeric(Number.NEGATIVE... |
import Todo from './Todo.js';
import React , { useState } from 'react';
export default function TodoList({inputTodos}) {
const[todos, setTodos] = useState(inputTodos);
function getRandomTodo() {
let randomIndex = Math.floor(Math.random() * todos.length);
return todos[randomIndex];
}
... |
import { doGetRequest } from './requests';
import SERVICE_HTTP from '../../constants/serviceHttpAddress';
const GET_URL = `${SERVICE_HTTP}/mytaxi/vehicles`;
const MyTaxiSource = {
fetchTaxies: () => doGetRequest(GET_URL),
};
export default MyTaxiSource;
|
import React, { Component } from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import styles from './Confirm.less';
import { signUpConfirm } from '../redux/actions';
class Confirm extends Component {
constructor(props) {
super(props);
this.state = {
email: props.... |
import { Roles } from 'meteor/alanning:roles';
import UserSettings from './UserSettings';
export default {
userSettings: (parent, args, { user }) => {
if (!user || !Roles.userIsInRole(user._id, 'admin')) {
throw new Error('Sorry, you need to be an administrator to do this.');
}
return UserSettings... |
var empresaModel = require('../models/empresaModel.js');
/**
* empresaController.js
*
* @description :: Server-side logic for managing empresas.
*/
module.exports = {
show: function (req, res) {
var id = req.params.id;
empresaModel.find({empresa: { $regex: id, $options: 'i' }}, function (err, e... |
module.exports = {
name: 'prune',
description: 'delete messages',
execute(message, args) {
const amount = parseInt(args[0]) + 1;
if(isNaN(amount))
return message.channel.send('Provide a number');
if(amount<=1 || amount>100)
return message.channel.send('provide... |
/*
* productUpdatesTaskController.js
*
* Copyright (c) 2017 HEB
* All rights reserved.
*
* This software is the confidential and proprietary information
* of HEB.
*/
'use strict';
/**
* Component of eCommerce task summary. Used to fetch and display list of eCommerce task only. This component does not... |
angular.module('app.routes', [])
.config(function($stateProvider, $urlRouterProvider) {
// Ionic uses AngularUI Router which uses the concept of states
// Learn more here: https://github.com/angular-ui/ui-router
// Set up the various states which the app can be in.
// Each state's controller can be found in c... |
import '../imports/startup/client/index.js'
import '../imports/ui/pages/banana/banana.js';
|
const { Pool } = require('pg');
const { SourceMapDevToolPlugin } = require('webpack');
const PG_URI = 'postgres://yvngawyd:[email protected]/yvngawyd';
// create a new pool here using the connection string above
const pool = new Pool({
connectionString: PG_URI
}... |
let ans = 8
let guess = prompt("Think of a number 1-10, inclusively. Submit your guess.");
if (Number(guess) === ans) {
alert("Great job! You guessed correctly!");
}
else if (Number(guess) > ans) {
alert("You are too high, refresh again and guess lower.");
}
else if (Number(guess) < ans) {
alert("You are too low,... |
import axios from 'axios';
import logger from '../logger';
import constants from '../constants';
const BASE_URL = process.env.BASE_URL;
const url = `${BASE_URL}${constants.url.PO}`;
const parsePo = po => {
return {
poFromLabel: po.poFromLabel,
workflowName: po.workflowName,
supplierName: po.supplierNam... |
const database = require("../controllers/database-controller");
const SESSIONS = "Sessions", SIGNED_IN = "signed_in", TIMED_OUT = "timed-out", CREATED = "created";
const createTransaction = rawTx => (
new Promise(resolve => {
rawTx.status = CREATED;
rawTx.accounts = [];
database.collection... |
class Person{
constructor(name,age){
this.name=name;
this.age=age;
}
}
class student extends Person{
constructor(name,age,school){
super(name,age) //super calls constructor of parent class
this.school=school;//this commands can't be used before super ()
}
}
let p=new Person("harry potter",20);
let s=new st... |
const { Schema, model } = require("mongoose");
const crypto = require("crypto-extra");
/**
* @description user schema
*/
const userSchema = new Schema(
{
role: {
type: String,
default: "user",
},
username: {
type: String,
unique: true,
required: true,
},
first_name... |
const express = require('express');
const path = require('path');
const morgan = require('morgan');
const bodyParser = require('body-parser');
const db = require('../database/seed.js');
const app = express();
const port = 3002;
app.use(morgan('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
ext... |
import React, { Component } from "react";
import {
StyleSheet,
Text,
View,
Button,
KeyboardAvoidingView,
ScrollView
} from "react-native";
import FontAwesomeIcon from "react-native-vector-icons/Entypo";
import { Fumi } from "react-native-textinput-effects";
import window from "../../constants/Layout";
impor... |
import api from './index';
import axios from '../http';
const headers = {
'Content-Type': 'application/json',
// 这里有一个很玄学的问题
token: localStorage.getItem('token'),
};
export default {
getPerson(num) {
return axios.get(api.getPerson(), { params: { page: num, size: 9 } }, { headers });
},
getMovie() {
... |
var Webmail = require('../index')
var user = {
username: '', // with @iitg.ernet.in
password: '',
mailServer: '', // Among 'disang', 'teesta', 'naambor', 'tambdil',
path: '', // specify relative folder where to save attachments
debug: true // for extra output, defaults to false
};
webmail = new Webmail(user... |
import '../styles/dashboard.css';
import React, { Component } from 'react';
import FutsalsComponent from './user/futsals';
import BookingsComponent from './user/bookings';
import { Route, Link, Redirect } from 'react-router-dom';
class DashboardComponent extends Component {
constructor(props) {
super(props... |
import React from "react";
import Login from "@components/login";
import { mount } from "enzyme";
import renderer from "react-test-renderer";
import { initializeStore } from "@store";
import { Provider } from "react-redux";
Object.defineProperty(window, "matchMedia", {
writable: true,
value: jest.fn().mockImpleme... |
'use strict';
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var STATE = {};
var SCREEN = [];
v... |
function setFieldStatus(P_CurrentStep, P_Status) {
var rows = $('#box-area-1').next().find('.row');
ctrlBoxArea1_Row1(P_CurrentStep, P_Status, $(rows).eq(0).children());
ctrlBoxArea1_Row2(P_CurrentStep, P_Status, $(rows).eq(1).children());
rows = $('#box-area-2').next().find('.row');
ctrlBox... |
var canvasParams = {
x: 1000,
y: 550
}
let boids = [];
var numOfBoids = 20;
let foods = [];
var numOfFood = 2; |
/** @jsx jsx */
import React from 'react';
import styled from '@emotion/styled';
import { jsx } from '@emotion/core';
import { colors } from '../../theme';
const EducationWrapper = styled('div')`
background-color: ${colors.gray};
color: ${colors.white};
width: 90%;
margin: auto;
display: flex;
flex-directi... |
const { withFilter } = require('graphql-subscriptions')
const pubsub = require('../../libaries/pubsub')
module.exports = {
Subscription: {
storeDetected: {
subscribe: withFilter(
() => pubsub.asyncIterator('storeDetected'),
(payload, args) => {
return payload.storeBranchId === arg... |
// const MongoClient = require('mongodb').MongoClient;
// can call connect on MongoClient to conenct to db
const { MongoClient, ObjectID } = require('mongodb');
// CONECT + INSERT
// 1st arg - string - url where db lives (w/ prod it would be a heroku url, in dev - it's local port - 27017) [port + / + db we want to c... |
import IssueItem from '../../components/issueItem/IssueItem'
import './IssuesGroupList.css'
const IssuesGropList = (props) => {
const gropDateTranslation = (type) => {
if (props.type === 'by_date') {
return {
today: 'Сегодня',
week: 'Эта неделя',
more_than_week: 'Больше недели'
... |
import React, { Component } from "react";
import { BrowserRouter as Router, Route, Switch } from "react-router-dom";
import ListProject from "./ListProject";
import AddProject from "./AddProject";
import EditProject from "./EditProject";
class ProjectIndex extends Component {
render() {
return (
<Router>
... |
import { useContext, useState } from 'react';
import { gql, useQuery } from '@apollo/client';
import TextField from '@material-ui/core/TextField';
import {
CircularProgress,
List,
ListItem,
ListItemSecondaryAction,
ListItemText,
} from '@material-ui/core';
import Button from '@material-ui/core/Butto... |
import React from "react";
import { Route } from "react-router-dom";
class CreateUser extends React.Component {
state = { name: "" };
render() {
return (
<div className="create-user">
<div className="pure-g">
<div className="pure-u-1">
<h2>Welcome!</h2>
<form
... |
import {
SET_TODOS,
ADD_TODO,
UPDATE_TODO,
REMOVE_TODO,
ROLLBACK,
REQ_POST_TODO,
REQ_GET_TODOS,
REQ_DELETE_TODO,
REQ_PUT_TODO
} from "../actions/types";
const defaultState = [];
function alertAndLogError(error) {
console.error(error);
error.alertMessage && alert(error.alertMessage);
}
export de... |
import React from 'react';
import Table from '../../Table/Table';
import { formatDate } from '../../../utils';
function AddressesTable({ addresses, onDelete }) {
const columns = [
{ title: 'Адрес', styles: { style: { color: 'rgba(0, 0, 0, 0.4)' }, itemCondition: item => item.addedAt === null } },
{ title: '... |
exports.actors = [
{
actor:
{
identity:
{ low: 15766, high: 0 },
labels: ['Actor', 'Person'],
properties:
{
tmdbId: '12899',
imdbId: '0001815',
born:
{
year:
{ low: 1... |
$("input[type='radio'][name^='option']").click(function() {
/*** Get the id in order to obtain the number associated with the select ***/
var id = $( this ).attr("id");
/*** Split to obtain just an array of parts ***/
var select = id.split("option");
/*** Concat to get the Select id name ***/
va... |
import React from "react";
import { BrowserRouter as Router, Route } from "react-router-dom";
import About from "./pages/about";
import FAQ from "./pages/faq";
import Login from "./pages/login";
import Manager from "./pages/manager";
import User from "./pages/user";
import DisplaySurvey from "./pages/survey"; //added
... |
//JS Basics
//Run npm test in the command line to test your solutions
module.exports = {
reverseIt:
// uncomment and finish the reverseIt function. It will take in one parameter which is a String and
// reverse it
function reverseIt(string){
var str = string.split("").reverse().join("");
return str;
... |
Ext.define('Assessmentapp.assessmentapp.web.com.controller.assessmentcontext.survey.AssessmentInferenceSheetLoaderUIController', {
extend: 'Assessmentapp.view.fw.frameworkController.FrameworkViewController',
alias: 'controller.AssessmentInferenceSheetLoaderUIController',
onbuttonclick: function(me, e, eO... |
'use strict';
const { Router } = require('express');
function unmatchedRouteHandler(request, response, next) {
const err = new Error('Not Found');
err.status = 404;
next(err);
}
module.exports = function unmatchedRouteHandlerFactory() {
return Router()
.use(unmatchedRouteHandler);
};
|
import React from 'react';
import { Link } from "react-router-dom";
// Style
import './css/redirect.css';
class Redirect extends React.Component {
render() {
return(
<div className="redirect-box">
<Link to="/backbook">
<button>Open app</button>
... |
/**
* Created by Alvys on 2015-05-27.
*/
module.exports = {
'servers' : {
/*
Gateway server
*/
'gatewayServers' : [{
'port' : 2999,
'connectorPort' : 3000,
'databaseAddress' : 'mongodb://localhost/dagger'
}],
/*
Game s... |
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 引入图标库
import './assets/font/iconfont.css'
// 引入cookie
import vueCookie from 'vue-cookie'
// 图片懒加载
import lazyLoad from 'vue-lazyload'
// 引入axios发送ajax
import axios from 'axios'
// 配置axios
Vue.prototype.ax... |
const SlashCommands = require('../lib/slack/slashCommands');
const Conversation = require('../lib/slack/conversation');
module.exports = function (controller) {
// handler for conversation
controller.on('direct_message,direct_mention', function(bot, message) {
// console.log("-------------------message c... |
//৮. একটা array এর মধ্যে অনেকগুলা ইংরেজি জাভাস্ক্রিপ্ট রিলেটেড বইয়ের নাম (স্ট্রিং) আছে। জাভাস্ক্রিপ্ট রিলেটেড বইয়ের নাম না জানলে, গুগলে সার্চ দিয়ে বের করো। তারপর একটা লুপ চালিয়ে দেখো কোন কোন বইয়ের নামের মধ্যে "javascript" আছে। তাহলে সেই বইগুলার নাম আরেকটা array এর মধ্যে রাখবে। আর হ্যাঁ, যখন javascript আছে কিনা চেক করবে... |
import {LOAD_LOCATION, LOAD_LOCATIONS, SAVE_LOCATION,
CREATE_LOCATION, ADD_LOCATION, CHANGE_LOCATION, FIND_LOCATIONS } from '../actions/location.action'
import { handle } from 'redux-pack';
const initialState = {
locations: [],
location: null,
tab: 'info',
error: null,
findLocations: []
}
... |
/*
* Copyright (C) 2021 Radix IoT LLC. All rights reserved.
*/
/**
* Old temporary resource service, use maTemporaryRestResource instead.
* This service is used for Haystack history import and SNMP walk.
*/
temporaryResourceFactory.$inject = ['$q', '$http', '$timeout'];
function temporaryResourceFactory($q, $ht... |
var Optimist = require('optimist')
, L = require('./logger')
, C = require('./config')
;
var commands
;
commands =
{ 'help' : 'help'
, 'setup' : 'setup'
, 'upgrade' : 'upgrade'
};
exports.run = function(){
var context
, command
, arguments
, index
;
context ... |
$(document).ready(function() {
//animation stopping error
//zaboronutu scroll when cinema mode
//code on w3
var time_speed = 1;
var time_interval = 60000;
var animate_time_interval = 60; // '/ 1000'
var time_now = 2018;
var f_inc;
var s_inc;
var circle_close_active = false;
var cinema_view_active = false... |
/*
Calculate the nth Fibonacci number, given:
Fib(n) = Fib(n-1) + Fib(n-2)
Fib(2) = 1
Fib(1) = 1
*/
// using RECURSION
// function fib(n) { // O(2^n)
// // base case
// if (n <= 2) return 1;
// // recursion
// return fib(n-1) + fib(n-2);
// }
// using DYNAMIC PROGRAMMING with memoization
// MY APPROACH - slo... |
const test = require('tape');
const bindAll = require('./bindAll.js');
test('Testing bindAll', (t) => {
//For more information on all the methods supported by tape
//Please go to https://github.com/substack/tape
t.true(typeof bindAll === 'function', 'bindAll is a Function');
var view = {
label: 'docs',
... |
$(function(){
//查询事件
$("#select").linkbutton({
onClick: function(){
//获取所有被选中的标签/
var label = '';
$("[name='label']:checked").each(function(){
label = label + $(this).val() + ',';
});
label = label.substring(0,label.length - 1);
var group = '';
//获取所有被选中的分组
$("[name='group']:... |
import treeListCore from './ui.tree_list.core';
import { columnChooserModule } from '../grid_core/ui.grid_core.column_chooser';
treeListCore.registerModule('columnChooser', columnChooserModule); |
/**
* Created by smile on 17/06/16.
*/
/**
* RawData Formular - Application Field Initialization Function
* Call Ajax to retrieve known applications list
* Triggers Applications Setting Function "setApplicationsId"
*/
function initializeApplicationsId(){
callAJAX("getAppList.json", '', "json", setApplica... |
/**
* Created by HX-MG01 on 2017/1/6.
*/
import Hello from './components/Hello'
import Index from './components/Index'
// 编写路由集合
const routes = [
{
name: 'Hello', // 路由名,这个字段是可选的
path: '/', // 路由路径,这里是根路径所以是'/'
component: Hello // 模板
}, // 这些是常用的
{
name: 'Index',
path: '/index',
componen... |
import React, { useEffect, useState } from "react";
import UserMain from "./UserMain.js";
import { observer, inject } from "mobx-react";
import { makeStyles } from '@material-ui/core/styles';
import Snackbars from '../../components/Snackbars/Snackbars'
import CreateReportDialog from '../Dialog/CreateReportDialog'
impor... |
class Generator{
constructor(){
this.coins = [];
}
generate(){
let value = Math.floor(Math.random() * 3 ) + 1;
let coin = new Coin(value);
this.coins.push(coin);
let maxX = CANVAS_WIDTH - coin.size / 2;
let min = coin.size / 2;
let maxY = CANVAS_HE... |
import React from "react";
import MenuList from "./menu";
import Logo from "./logo";
export default class Header extends React.Component {
constructor(props) {
super(props);
this.state = {
open: false
};
this.OpenMenu = this.OpenMenu.bind(this);
}
OpenMenu(e) {
this.setState(prevStat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.