text stringlengths 2 1.05M |
|---|
import * as React from 'react';
import wrapIcon from '../utils/wrapIcon';
const rawSvg = (iconProps) => {
const { className, primaryFill } = iconProps;
return React.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", xmlns: "http://www.w3.org/2000/svg", className: className },
React.crea... |
var searchData=
[
['blosum_2ecpp_122',['blosum.cpp',['../blosum_8cpp.html',1,'']]],
['blosum_2ehpp_123',['blosum.hpp',['../blosum_8hpp.html',1,'']]]
];
|
import React from "react";
import { graphql } from "react-apollo";
import gql from "graphql-tag";
function BrighterApp({ data: { ideas, refetch } }) {
return (
<div>
<button onClick={() => refetch()}>Refresh</button>
<ul>{ideas && ideas.map(idea => <li key={idea.id}>{idea.text}</li>)}</ul>
</div>
);
}
exp... |
import IconService, { IconConverter } from 'icon-sdk-js'
import { SCORE_NETWORK, SCORE_ENDPOINT, Networks, ICX_TOKEN_CONTRACT, ICX_TOKEN_DECIMALS, MAX_ITERATION_LOOP } from './constants'
// ================================================
// Constants
// ================================================
const SwapCrea... |
exports.up = function(knex) {
return knex.schema
.createTable('users', users => {
users.increments('user_id');
users
.string('username')
.notNullable()
.unique();
users.string('password').notNullable();
})
.c... |
"use strict";
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
return cooked;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
... |
(function () {
angular.module('c8y.sdk').directive('c8yRepeat', [
'$injector',
'$compile',
'$rootScope',
c8yRepeat
]);
function c8yRepeat(
$injector,
$compile,
$rootScope
) {
function createLink(clonedElement) {
return function (scope, _elem, attrs) {
var ele... |
/**
* First we will load all of this project's JavaScript dependencies which
* includes Vue and other libraries. It is a great starting point when
* building robust, powerful web applications using Vue and Laravel.
*/
require('./bootstrap');
require('./jquery-ui.min');
require('./jquery.dataTables.min.js');
$( ... |
import '../../src/docs.scss'
import '../../src/index.scss'
import '../../src/base/index.scss'
import '../src/stories/helpers/storybook-styles.scss'
import renderToHTML from '../src/stories/helpers/code-snippet-html-helper'
const customViewports = {
minXS: {
name: 'XS (min)',
styles: {
width: '375px',
... |
import { createSlice } from '@reduxjs/toolkit';
import axios from 'axios';
const slice = createSlice({
name: 'movies',
initialState: {
list: [],
moviesFilter: '',
genreFilter: '',
directorFilter: '',
moviesSort: '',
},
reducers: {
moviesRetrieved: (movies, action) => {
movies.list... |
var searchData=
[
['zeroorderhold',['ZeroOrderHold',['../classdrake_1_1systems_1_1_zero_order_hold.html#a0d112baac097caa5fed5378a07d423ce',1,'drake::systems::ZeroOrderHold']]]
];
|
webpackJsonp([0],{"/7ul":function(e,t,n){(function(e){"use strict";e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mer... |
'use strict';
import React from 'react';
import ReactNative from 'react-native';
let { View, StyleSheet, TextInput, Text} = ReactNative;
import {DatePickerComponent} from '../lib/DatePickerComponent';
export class TimePickerField extends React.Component{
setTime(date){
this.refs.datePickerComponent.setDate(da... |
import React from 'react';
import NavMenu from './Menu/NavMenu';
import Grid from '@material-ui/core/Grid';
export default function Layout(props) {
return (
<Grid container spacing={4}>
<Grid container spacing={3}>
<Grid item xl={12}>
<NavMenu />
... |
(function($){
$.fn.validationEngineLanguage = function(){
};
$.validationEngineLanguage = {
newLang: function(){
$.validationEngineLanguage.allRules = {
"required": { // Add your regex rules here, you can take telephone as an example
"regex": "geen",
"aler... |
const express = require("express");
const router = express.Router();
const stripe = require("stripe")(process.env.STRIPE_SECRET_TEST);
const ErrorCodes = require("../core/constants");
// Post Book Detail
router.post("/", async function (req, res, next) {
let { amount, id } = req.body;
try {
const payment = aw... |
// Uses Node, AMD or browser globals to create a module.
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else if (typeof exports === 'object') {
// Node. Does not work with strict Commo... |
import EventEmitter from 'events'
import React, { useState, useEffect, useRef, useContext } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import PropTypes from 'prop-types'
import { shuffle } from 'lodash'
import { useHistory } from 'react-router-dom'
import classnames from 'classnames'
import { n... |
window.config = {
// default: '/'
routerBasename: '/',
extensions: [],
showStudyList: true,
filterQueryParam: false,
servers: {
dicomWeb: [
{
name: 'DCM4CHEE',
qidoRoot: 'https://server.dcmjs.org/dcm4chee-arc/aets/DCM4CHEE/rs',
wadoRoot: 'https://server.dcmjs.org/dcm4chee-a... |
"use strict";
const https = require("https");
const Router = require("koa-router");
const superagent = require("superagent");
const { assertThat, equalTo, is } = require("hamjest");
const { hasHeader, hasStatusCode } = require("superjest");
const SimpleWeb = require("../src/simple-web");
const PORT = process.env.PO... |
/*
Copyright 2020 Bruno Windels <bruno@windels.cloud>
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 ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=provision_ptys_sub_grp.js.map |
__ace_shadowed__.define('ace/ext/options', ['require', 'exports', 'module' ], function(require, exports, module) {
var modesByName = modelist.modesByName;
var options = [
["Document", function(name) {
doclist.loadDoc(name, function(session) {
if (!session)
return;
... |
"use strict";
var _a, _b;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataAwsGlueConnection = exports.DataAwsGlueConnectionPhysicalConnectionRequirements = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
/**
* @stability stable
*/
class DataAwsGlu... |
describe("headers and rules", function() {
'use strict';
describe("header markup", function() {
[1,2,3,4,5,6].forEach(function(i) {
it("wraps a line starting with " + "#".repeat(i) + " with a <h" + i + "> element", function() {
expect(
"#".repeat(i) + "Haruyasumi natsuyasumi akiyasumi fuyuyasumi"
... |
window.SilverTick = Ember.Application.create();
window.SilverTick.ApplicationAdapter = DS.FixtureAdapter.extend(); |
/*
* Kendo UI v2015.2.805 (http://www.telerik.com/kendo-ui)
* Copyright 2015 Telerik AD. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial licen... |
import 'es6-promise/auto';
import 'whatwg-fetch';
import React from 'react';
import { render } from 'react-dom';
import App from './app';
const MOUNT_NODE = document.getElementById('root');
render(<App />, MOUNT_NODE);
|
import _ from 'lodash';
import React from 'react';
import semver from 'semver-compare';
import {
Button,
ButtonGroup,
ButtonToolbar,
Input,
Label,
} from 'reactstrap';
import GeometryType from 'ol/geom/GeometryType';
import {
CheckboxField,
EnumFileSelectMode,
FileSelectField,
GeometryField,
Sel... |
import * as dagPB from '@ipld/dag-pb'
import {
Bucket,
createHAMT
} from 'hamt-sharding'
import { DirSharded } from './dir-sharded.js'
import { logger } from '@libp2p/logger'
import { UnixFS } from 'ipfs-unixfs'
import last from 'it-last'
import { CID } from 'multiformats/cid'
import {
hamtHashCode,
hamtHashFn,... |
$('#infotabs').tabs();
var benchmarkName = "Humanoid Sprint";
var humanoid_sprint_time_string;
var humanoid_sprint_time;
webots.window('humanoid_sprint').receive = function(message, robot) {
if (message.startsWith('time:')) {
humanoid_sprint_time = parseFloat(message.substr(5));
humanoid_sprint_time_string ... |
/**
* Load methods
* @module _Rest
* @submodule load
* @author Claudio A. Marrero
* @class _Rest.load
*/
'use strict';
module.exports = function(params){
var Loader = (function(){
/**
* Total of the initialization modules
*
* @property _totalInitModules
* @private
*/
var _totalInitModules = 0... |
'use strict';
const
express = require('express'),
bodyParser = require('body-parser'),
app = express().use(bodyParser.json());
app.listen(process.env.PORT || 4000, () => console.log('webhook is listening.'));
app.post('/webhook', (req, res) => {
let body = req.body;
if (body.object === 'page') {
... |
/***************************************************************************************************************************************************************
*
* Plug-in for Pancake
*
* Generate a json file from all pancake modules.
*
* @repo - https://github.com/govau/pancake
* @author - Dominik Wilkowsk... |
import styled from 'styled-components';
const Information = styled.div`
display: flex;
color: #aaa;
font-size: 14px;
margin-bottom: 12px;
& svg {
width: 2px;
margin: 0 10px;
}
`;
export default Information;
|
import React, { useEffect, useState } from "react";
import styled from "styled-components";
import {
getUserBio,
getUserImg,
isUserLoggedIn,
} from "../../features/authentication/authSlice.js";
import { useSelector } from "react-redux";
import {
faCog,
faPlus,
faCheckCircle,
} from "@fortawesome/free-solid-... |
{
"service" : {
"api" : "http",
"port" : 8080,
"ip" : "127.0.0.1",
},
"http" : {
"script" : "/test"
},
}
|
// Great tutorial how to use Sinon @link https://semaphoreci.com/community/tutorials/best-practices-for-spies-stubs-and-mocks-in-sinon-js
// Use sinon assertions and matchers where it is possible https://sinonjs.org/releases/v9.0.2/matchers/
require('app-module-path').addPath(process.cwd() + '/src');
const AWSMock = r... |
'use strict';
const _ = require('lodash');
const Promise = require('bluebird');
var config = require('./config');
var db = require('./services/db');
var commands = require('./commands');
const tasks = require('./tasks');
const warn = _.memoize(console.warn);
const bot = require('./services/irc').setUp(config.irc);
if ... |
////////////////////////////////////////////////////////////////////////////
//
// Copyright 2021 Realm Inc.
//
// 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/li... |
'use strict';
const path =require( 'path');
module.exports = {
env: process.env.NODE_ENV,
// Root path of server
root: path.normalize(__dirname + '/../../..'),
// Server port
port: process.env.PORT || 9000,
// Server IP
ip: process.env.IP || '0.0.0.0',
// Should we populate the DB w... |
/**
* Select2 Brazilian Portuguese translation
*/
(function ($) {
"use strict";
$.extend($.fn.select2.defaults, {
formatNoMatches: function () { return "Nenhum resultado encontrado"; },
formatInputTooShort: function (input, min) { var n = min - input.length; return "Digite mais " + n + " cara... |
var CustomFormatter = function(options) {
var ParallelCucumber = require('../../../lib/parallel_cucumber');
var OS = require('os');
var self = ParallelCucumber.Formatters.Formatter(options);
self._firstFeature = true;
var superEnd = self.end;
self._write('Start' + OS.EOL);
self.formatFeature = functio... |
const path = require('path');
const HtmlWebpackPlugin = require("html-webpack-plugin");
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const OptimizeCSSAssetsPlugin = require("optimiz... |
var test = require('tape')
var b64 = require('../')
test('convert big data to base64', function (t) {
var b64str, arr, i, length
var big = new Uint8Array(64 * 1024 * 1024)
for (i = 0, length = big.length; i < length; ++i) {
big[i] = i % 256
}
b64str = b64.fromByteArray(big)
arr = b64.toByteAr... |
const express = require('express')
const path = require('path')
const app = express()
// Serve the static files from the React app
app.use(express.static(path.join(__dirname, '/dist')))
// Handles any requests that don't match the ones above
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname + '/dist/... |
/**
* Copyright IBM Corp. 2019, 2020
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*
* Code generated by @carbon/icon-build-helpers. DO NOT EDIT.
*/
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === '... |
module.exports = {
plugins: [
require("postcss-import"),
require("tailwindcss/nesting"),
require("tailwindcss"),
require("autoprefixer"),
],
}
|
import React from "react"
import ErrorIcon from "@material-ui/icons/ErrorOutlineSharp"
import MenuIcon from "@material-ui/icons/Menu"
import EditRoundedIcon from "@material-ui/icons/EditRounded"
import ThumbUpOutlinedIcon from "@material-ui/icons/ThumbUpOutlined"
import ContactSupportOutlinedIcon from "@material-ui/ico... |
/**
* Farbtastic Color Picker 1.2
* © 2008 Steven Wittens
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
*... |
/*global define, $*/
define(['marionette', 'vent', 'tpl!./templates/layout.html', './views/Header', './views/Footer', './views/ActiveCount',
'./views/TodoListCompositeView', './collections/TodoList', './models/Todo', 'Parse'
],
function (Marionette, vent, layoutTemplate, HeaderView, FooterView, ActiveCountView, T... |
var gulp = require('gulp');
var jasmineBrowser = require('gulp-jasmine-browser');
gulp.task('jasmine', function() {
return gulp.src(['src/**/*.js', 'spec/**/*_spec.js'])
.pipe(jasmineBrowser.specRunner())
.pipe(jasmineBrowser.server({port: 8888}));
});
|
function showTip(numRandom2) {
var tip = tipsList[numRandom2];
var paragraph = document.getElementById('paragraph');
paragraph.textContent = tip;
} |
var slaer = require('../dist/slaer-core.js'),
assert = require('assert');
beforeEach(function() {
slaer.wipeCleanAndStartAgain();
})
describe('adding a new component', function() {
context('when not already exists', function() {
it('must add it to the registry', function() {
slaer.component('test'... |
/*
* ========================================================
* <a href="http://www.openolat.org">
* OpenOLAT - Online Learning and Training</a><br>
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>
* You may ... |
'use strict';
const factory = require('./helpers/factory');
const {Engine} = require('../');
const {EventEmitter} = require('events');
describe('issues', () => {
describe('issue 19 - save state', () => {
it('make sure there is something to save on activity start event', async () => {
const messages = [];
... |
export default Object.preventExtensions(() => {}); |
import { SET_NAME } from '../../actions-type'
import { ADD_NAME } from '../../mutations-type'
export default {
[SET_NAME]({ commit }, payload) {
commit(ADD_NAME, payload)
},
}
|
// `swagger-client.js` - how to plug-in to build an interface with `swagger-client`
const Hapi = require('@hapi/hapi');
const Joi = require('joi');
const Swagger = require('swagger-client');
const HapiSwagger = require('../');
let swaggerOptions = {
documentationPage: false,
swaggerUI: false,
tags: [
{
... |
import phaser from 'phaser/src/phaser.js';
import UIPlugin from '../../templates/ui/ui-plugin.js';
const COLOR_PRIMARY = 0x4e342e;
const COLOR_LIGHT = 0x7b5e57;
const COLOR_DARK = 0x260e04;
class Demo extends Phaser.Scene {
constructor() {
super({
key: 'examples'
})
}
preload(... |
function multiply(...numbers) {
if (numbers.length < 2) throw new Error('Must supply at least 2 numbers')
let output = 1
numbers.forEach(n => {
output *= n
})
return output
}
module.exports = {
handler: multiply,
allowBonusArgs: true,
noOptions: true,
aliases: ['product']
}
|
var searchData=
[
['anymetadata_0',['AnyMetadata',['../classoperations__research_1_1_m_p_array_with_constant_constraint.html#a9b35d94da3444084fc3673b7717b6cfe',1,'operations_research::MPArrayWithConstantConstraint::AnyMetadata()'],['../classoperations__research_1_1_flow_node_proto.html#a9b35d94da3444084fc3673b7717b6c... |
/**
* @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/
/* globals Range, DocumentFragment, HTMLElement, document, Text */
import ViewText from '../../../src/view/text';
import ViewElement from '../../../src/view/element';
import ViewPosition f... |
import React from 'react';
import {Redirect} from "react-router";
import {Link} from 'react-router-dom';
import PropTypes from "prop-types";
import get from 'lodash/get';
import TextField from '@material-ui/core/TextField';
import Button from '@material-ui/core/Button';
import Typography from '@material-ui/core/Typog... |
import {
addClass,
getScrollbarWidth,
getScrollTop,
getWindowScrollLeft,
hasClass,
outerHeight,
innerWidth,
removeClass,
setOverlayPosition,
} from './../../../../helpers/dom/element';
import {WalkontableOverlay} from './_base';
/**
* @class WalkontableTopOverlay
*/
class WalkontableTopOverlay exte... |
import React from "react"
import { FaTimes } from "react-icons/fa"
import Links from "../constants/links"
import SocialLinks from "../constants/socialLinks"
const Sidebar = ({isOpen, toggleSidebar}) => {
return <aside className={`sidebar ${isOpen ? "show-sidebar": ""}`}>
<button className="close-btn" onClick={... |
$(document).ready(function() {
$("#nav-mobile").mmenu();
$("#owl-slider").owlCarousel({
pagination: true,
autoPlay: true,
slideSpeed: 300,
paginationSpeed: 400,
singleItem: true
});
$("#owl-news").owlCarousel({
pagination: false,
slideSpeed: 300,
... |
(this.webpackJsonptagging_interface=this.webpackJsonptagging_interface||[]).push([[0],{133:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4goMAxI5sonxsgAACLtJREFUWMPtmHtwVNUdxz/n7t3dJLuJAUkkCiRgI6IG5ZFigtUi1VKiTIDOGKoyQwkyZIrWGUU67VBt2t... |
import React, { useState } from 'react';
import LockOutlinedIcon from '@material-ui/icons/LockOutlined';
import {makeStyles, Link, Avatar, Button, CssBaseline, TextField, Grid, Typography, Container} from '@material-ui/core';
import axios from 'axios'
import {useHistory} from 'react-router-dom';
const header = {withCr... |
// eslint-disable-next-line
import * as loginService from '@/api/login'
// eslint-disable-next-line
import { BasicLayout, BlankLayout, PageView, RouteView } from '@/layouts'
// 前端路由表
const constantRouterComponents = {
// 基础页面 layout 必须引入
BasicLayout: BasicLayout,
BlankLayout: BlankLayout,
RouteView: RouteView,... |
import Ember from 'ember';
export default Ember.Controller.extend({
session: Ember.inject.service('session'),
currentlyLoading: true,
actions: {
}
});
|
'use strict';
const createRuleTester = require('../createRuleTester');
function createRuleTesterPromise(rule, schema) {
const contexts = [];
return new Promise((resolve, reject) => {
const ruleTester = createRuleTester((promise, res) => {
contexts.push(res);
promise.then(resolve, reject);
});
ruleTest... |
import * as React from 'react';
import Calendar from '../Calendar';
import styles from './Picker.less';
type Props = {
maxYear?: number,
minYear?: number,
value: ?Date,
onPick: (date: Date) => void
};
export default class Picker extends React.Component<Props> {
_mounted: boolean;
_calendar: Calendar ... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class Point {
constructor(x, y) {
this.x = x;
this.y = y;
}
toString() {
return `${this.x} ${this.y}`;
}
}
exports.Point = Point;
//# sourceMappingURL=point.js.map |
const mongoose = require('mongoose')
const { encryptPassword } = require('../../../../encryption')
const Schema = mongoose.Schema
const userSchema = new Schema({
email: {
type: String,
required: true
},
password: {
type: String,
required: true
},
createdProjects: [
{
type: Schema.T... |
const validator = require("validator");
const isEmpty = require("is-empty");
function validateAddPokemonInput(data) {
const errors = {};
// Convert empty fields to "" for validator function
data.name = !isEmpty(data.name) ? data.name : "";
data.pokedex = !isEmpty(data.pokedex) ? data.pokedex : "";
data.attac... |
/*!
=========================================================
* Material Dashboard React - v1.8.0
=========================================================
* Product Page: https://www.creative-tim.com/product/material-dashboard-react
* Copyright 2019 Creative Tim (https://www.creative-tim.com)
* Licensed under MIT (h... |
import img1 from './img1.jpg'
import img2 from './img2.jpg'
import img3 from './img3.jpg'
import img4 from './img4.jpg'
import img5 from './img5.jpg'
import img6 from './img6.jpg'
import img7 from './img7.jpg'
import img8 from './img8.jpg'
const spaAvedaCharisma = [img1, img2, img3, img4, img5, img6, img7, img8]
expo... |
// Autogenerated from KST: please remove this line if doing any edits by hand!
var assert = require('assert');
var testHelper = require('testHelper');
testHelper('IntegersMinMax', 'src/integers_min_max.bin', function(r, IntegersMinMax) {
assert.strictEqual(r.unsignedMin.u1, 0);
assert.strictEqual(r.unsignedMin.u... |
import models, { sequelize } from '../models'
import { transactionSeeds } from './transactions'
export const createTransactions = async () => {
await models.transactions.bulkCreate(
transactionSeeds
)
} |
var book = {
"name": "Markus",
"numChapters": 16,
"chapters": {
"1": {
"1": "<span>1 </span> Inilah permulaan Injil tentang Yesus Kristus, Anak Allah.",
"2": "<span>2 </span> Seperti ada tertulis dalam kitab nabi Yesaya: \"Lihatlah, Aku menyuruh utusan-Ku mendahului Engkau, ia akan mempersiapkan jalan bagi-M... |
const path = require('path');
const packageName = path.parse(require('./package.json').name).name.toLowerCase().replace(/-/g, '');
module.exports = {
mode: 'development',
entry: {
package: './src/package.ts',
test: {filename: 'package-test.js', library: {type: 'var', name:`${packageName}_test`}, import: '.... |
import lib from 'lib';
export default lib;
|
const jsdom = require("jsdom");
const {JSDOM} = jsdom;
const {document} = (new JSDOM("<!doctype html><html><body></body></html>")).window;
global.document = document;
global.window = document.defaultView;
XMLHttpRequest = require("xhr");
const Augmented = require("../scripts/core/augmented.js");
describe('Given a tra... |
// Util
const w3utils = require('web3-utils');
const { toBN, toWei, fromWei, hexToAscii } = require('web3-utils');
const toUnit = amount => toBN(toWei(amount.toString(), 'ether'));
const fromUnit = amount => fromWei(amount, 'ether');
const toBytes32 = key => w3utils.rightPad(w3utils.asciiToHex(key), 64);
co... |
function var_export(mixed_expression, bool_return) {
// discuss at: http://phpjs.org/functions/var_export/
// original by: Philip Peterson
// improved by: johnrembo
// improved by: Brett Zamir (http://brett-zamir.me)
// input by: Brian Tafoya (http://www.premasolutions.com/)
// input by: Hans Henrik ... |
export default (state = {user: {}}, action) => {
switch (action.type) {
case 'SET_USER':
return {
user: action.user
};
default:
return state;
}
};
|
/*
* Copyright 1998-2015 Linux.org.ru
* 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... |
/*
* Copyright © 2016-2019 The Thingsboard Authors
*
* 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 ... |
/*! grafana - v2.5.0 - 2015-10-28
* Copyright (c) 2015 Torkel Ödegaard; Licensed Apache-2.0 */
define(["angular","jquery","../core_module","bootstrap-tagsinput"],function(a,b,c){"use strict";function d(a){for(var b=5381,c=0;c<a.length;c++)b=(b<<5)+b+a.charCodeAt(c);return b}function e(a,b){var c=d(a.toLowerCase()),e=... |
'use strict';
/* Services */
var dreamsServices = angular.module('dreamsServices', ['ngResource']);
dreamsServices.factory('Log', ['$resource',
function ($resource) {
return $resource("auth/log", {}, {
get: {method: 'GET'}
});
}]);
dreamsServices.factory('Login', ['$resource',
... |
console.error("HALP!")
console.log("Logging for the first time")
console.warn("WARNING WARNING DANGER WILL ROBINSON")
|
var a = {b = 1}; |
import React from 'react'
import SinglePost from '../SinglePost/SinglePost'
import PostsContainer from './Posts.styles'
import { Container, MainSection } from '../../shared'
const Posts = ({ posts }) => {
return (
<MainSection>
<Container>
<PostsContainer className='fadeIn delay-6'>
{po... |
'use strict';
/* ------------------------------------------------------------------------ */
const { unCamelCase } = require ('./functions/string')
const unCamelCasePropertyNames = x => {
for (const k in x) x[unCamelCase(k)] = x[k] // camel_case_method = camelCaseMethod
return x
}
/* -------------------------... |
import { mount, shallowMount } from "@vue/test-utils";
import Sortable from "sortablejs";
jest.genMockFromModule('sortablejs');
jest.mock('sortablejs');
const SortableFake = {
destroy: jest.fn(),
option: jest.fn()
};
Sortable.mockImplementation(() => SortableFake);
import draggable from "@/vuedraggable";
import Vue... |
import React, { Component } from 'react';
import './App.css';
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import ItemsList from './components/ItemsList'
import ItemsNew from './components/ItemsNew'
import ItemsShow from './components/ItemsShow'
import ItemsEdit from './components/ItemsEdi... |
const Article = require('../../db/article');
export default function load(req) {
const currentPage = parseInt(req.query.currentPage) || 1;
const perPage = 20;
const user = req.session.user;
const city = user ? user.city : 'jinzhou';
return new Promise((resolve, reject) => {
let options = {
currentP... |
require("kaoscript/register");
module.exports = function() {
var Float = require("./namespace.export.default.ks")().Float;
console.log(Float.toString(3.14));
}; |
var BlankonSignType2 = function () {
return {
// =========================================================================
// CONSTRUCTOR APP
// =========================================================================
init: function () {
BlankonSignType2.signBa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.