text stringlengths 7 3.69M |
|---|
/*
* @lc app=leetcode.cn id=90 lang=javascript
*
* [90] 子集 II
*/
// @lc code=start
/**
* @param {number[]} nums
* @return {number[][]}
*/
var subsetsWithDup = function (nums) {
let result = [],
arr = [],
len = nums.length;
nums = nums.sort();
const backTrace = (index) => {
result.push([...arr... |
import { NavLink } from 'react-router-dom';
import styled from '@emotion/styled';
export const Header = styled.header`
padding: 10px;
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
`;
export const Ul = styled.ul`
display: flex;
list-style: none;
`;
export const Li = styled.li`
font-size: 20px;
&:first-of-ty... |
import {StyleSheet} from 'react-native';
export default StyleSheet.create({
containerStyle: {
height: 90,
marginHorizontal: 45,
flexDirection: 'column',
justifyContent: 'flex-end',
alignItems: 'flex-start',
},
inputContainer: {
minHeight: 43,
height: 40,
flexDirection: 'row',
... |
export {_road_} from './RoadStore';
export {_common_} from './CommonStore';
export {_leftNavbar_} from './LeftNavbarStore';
export {_login_} from './LoginStore';
export {_auth_} from './AuthStore';
export {_register_} from './RegisterStore';
export {_history_} from './HistoryStore';
export {_rating_} from './RatingStor... |
$(function() {
$("input[type=submit]").addClass("submit");
$("input[type=reset]").addClass("reset");
$("input[type=button]").addClass("button");
$("input[type=checkbox]").addClass("checkbox");
$("input[type=radio]").addClass("radio");
$("li").hover(function() {
$(this).addClass("h... |
import React, { Component } from 'react'
import { Bar, Line, Pie, Bubble, Doughnut } from 'react-chartjs-2';
import * as d3 from "d3";
import { cloneNode } from '@babel/types';
export class Charts extends Component {
state = {
chartData :{
labels : [this.props.habits],
datasets: [... |
import React, { Component } from 'react';
import Navbar from '../Navbar';
import { Container, Row, Col } from 'reactstrap';
import { connect } from 'react-redux';
import './styles.scss';
class Layout extends Component {
render() {
const { children } = this.props;
return (
<main>
<Navbar />
... |
$(document).ready(function () {
let loader = {
loading: false,
timer: null,
start: function () {
this.loading = true;
this.timer = setTimeout(function () {
$('#form').addClass('loading');
this.timer = null;
}, 100);
... |
/**
* 导出类型标识
*/
var ExportType = (function () {
function ExportType() {
}
/**图片**/
ExportType.Image = 0;
/**文本框*/
ExportType.Text = 1;
/**复合容器**/
ExportType.Container = 2;
/**按钮 */
ExportType.Button = 3;
return ExportType;
}());
|
const express = require("express");
const path = require("path");
const session = require("express-session");
const app = express();
const user_data = {
id: "a",
pw: "b"
};
app.use(express.static(path.join(__dirname, "public")));
app.use(express.json());
app.use(express.urlencoded({
extended: false
}));
app.u... |
function newProduct(request,response) {
let db =request.app.get('db')
db.new_product([request.body.name,request.body.price,request.body.img_url])
.then(result => response.json(result))
.catch(error => {
response.status(500).json("There was an error")
console.log(error)
})
}
func... |
const express = require('express');
const fs = require('fs').promises;
const logLineAsync = require('./utils').logLineAsync;
const path = require('path');
const FormData = require('form-data');
const cors = require('cors');
const fetch = require("isomorphic-fetch");
const webServer = express();
const port = '4095';
c... |
var express = require('express')
var router = express.Router()
var axios = require("axios")
var auth = require("../auth/auth")
var antlr4 = require('antlr4/index')
var NewsLexer = require('../grammars/news/newsLexer').newsLexer
var NewsParser = require('../grammars/news/newsParser').newsParser
var NewsListener = requir... |
//During the test the env variable is set to test
process.env.DATABASE = 'CHECK_IN_TEST';
let mongoose = require("mongoose");
let admin_db = require('./../../database/models/admin');
let user_db = require('./../../database/models/user');
let account_db = require('./../../database/models/account');
let merchant_db = re... |
class Pile {
constructor(cards) {
this.pile = cards;
this.render();
}
render() {
this.pile.forEach ( card => {
var pile = document.getElementById('pile');
pile.appendChild(card.image);
});
}
takeCards(cards) {
this.pile.push(...cards);
}
resetPile() {
this.pile = []... |
//Transforms
var transforms = {
"statistics": [
[
{"<>":"tr","html":[
{"<>":"th","class":"left","html":"${name}"},
{"<>":"th","class":"right","html":"${value}"}
]}
]
],
"management": [
[
{"<>":"tr","html":[
{"<>":"th","class":"left","html":"${he... |
'use strict';
const Fs = require('fs');
const MkDir = require('mkdirp');
const RmDir = require('rimraf');
module.exports = {
mkDirSync: MkDir.sync,
mkDir: MkDir,
rmDirSync: RmDir.sync,
rmDir: RmDir,
isFile: (file) => {
try {
return Fs.statSync(file).isFile();
}
... |
// Because classes are not hoisted you will need to start your code at the bottom of the page. Look for the comment "START HERE"
class Article {
constructor(domElement) {
// assign this.domElement to the passed in domElement
this.domElement = domElement;
// create a reference to the ".expandButton" clas... |
const MovieCrawl = ({movieDetails}) => {
return (
<div id="scroll-container" className="text-align-justify mb-5">
<div id="scroll-text">
{movieDetails[0].opening_crawl}
</div>
</div>
)
}
export default MovieCrawl
|
/*Resize the canvas*/
/*X is first - Width.*/
/*Y is height. The second parameter.*/
function resize(x, y){
var canvas = document.getElementById("gameCanvas");
var canvasDiv = document.getElementById("gameCanvasDiv");
canvas.style.width = x + "px";
canvas.style.height = y + "px";
canvasDiv.style.width = x + "px";
... |
import React, { Component } from 'react';
import { getCookie, setCookie, link } from '../lib';
import socketIOClient from 'socket.io-client';
import './GamesList.css';
import Button from './Button';
const socket = socketIOClient(link);
var winH = window.innerHeight;
var winW = window.innerWidth;
class GamesList exten... |
import { useState, useEffect } from "react";
import {
Modal,
Fade,
Backdrop,
Button,
makeStyles,
TextField,
} from "@material-ui/core";
import { updateProfileSocialLink } from "../redux/actions/profile";
const useStyles = makeStyles((theme) => ({
paper: {
// position: "absolute",
transform: `tran... |
import React from 'react'
import {connect} from 'react-redux'
class welcome extends React.Component{
render(){
return(
<div>
<h2>
Welcome {this.props.name}
</h2>
<p>
Your email is: {this.props.email}
... |
//document.addEventListener("DOMContentLoaded",function()){
$(document).ready(function(){
var xhttp= new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200){
var data = JSON.parse(this.responseText);
var all_creatures = data.creatures;
... |
const mongoose = require("mongoose");
const WebsiteSchema = require("./website.schema");
const WebsiteModel = mongoose.model("WebsiteModel", WebsiteSchema);
// Find websites for user.
WebsiteModel.findAllWebsitesForUser = (uid) => {
return WebsiteModel.find({developerId: uid});
}
// Create website... |
export const SET_RENDER_ELEMENTS = 'TITLE_SET_RENDER_ELEMENTS';
export const LEAVING = 'TITLE_LEAVING';
export const DONE = 'TITLE_DONE';
export const START = 'TITLE_START';
|
import React, {useState, useEffect, useContext} from 'react';
import Post from 'components/Post';
import getPosts from 'components/services/getPosts';
import Loading from 'components/Loading';
import PostsContext from 'components/Context/AppContext';
import './css.css';
export default function List() {
const [da... |
import styleProps from '../config/props'
import { useVariantColorWarning, forwardProps } from '../utils'
import useCheckboxStyle from '../Checkbox/checkbox.styles'
import Box from '../Box'
import VisuallyHidden from '../VisuallyHidden'
import ControlBox from '../ControlBox'
const Radio = {
name: 'Radio',
inject: [... |
export const PROD_BASE_URI = 'https://retailer-api.urb-it.com/api/';
export const STAGE_BASE_URI = 'https://stage-retailer-api.urb-it.com/api/';
export const IMS_STAGE_BASE_URI = 'https://stage-ims-api.urb-it.com/v1/';
export const IMS_PROD_BASE_URI = 'https://ims-api.urb-it.com/v1/';
export const OPENING_HOURS_REGEX ... |
import React, { useEffect, useState } from "react";
function CountdownTimer(props) {
const [Total, setTotal] = useState();
const [Seconds, setSeconds] = useState();
const [Minutes, setMinutes] = useState();
const [Hours, setHours] = useState();
function getTimeRemaining() {
console.log(Date.parse(props.... |
var files________5____8js__8js_8js =
[
[ "files____5__8js_8js", "files________5____8js__8js_8js.html#afbcb375f7853ceb1d5a6704de668abba", null ]
]; |
export { default as injectIntl, createFormatters } from './injectIntl';
export { default as connectAndInjectIntl } from './connectAndInjectIntl';
export { default as intlReducer } from './intlReducer';
export { changeLocaleAction } from './intlActions';
export { addLocaleData } from './localeDataRegistry';
export {
... |
var assert = require("assert"),
burro = require("../lib/burro"),
stream = require("stream");
describe("burro.Unframer", function(){
var unframer, writable;
beforeEach(function() {
unframer = new burro.Unframer();
unframer.writeBytes = function() {
this.write(Buffer(arguments));
... |
//var counter = 500;
var counter = 8078;
var sum;
var nDivisors = 0;
while(true) {
sum = 0;
for(var i = 0; i < counter; i++) {
sum += i;
}
nDivisors = findDivisors(sum);
console.log(counter, ' th triangle | sum: ', sum, ' | nDivisors: ', nDivisors);
//console.log('sum: ', sum, ' nDivisors: ', nDivisors... |
import React, { Component } from 'react';
import * as api from '../api';
import CommentForm from './forms/CommentForm';
import Comment from './Comment';
import { navigate } from '@reach/router';
import ajaxLoader from '../img/ajax-loader.gif';
class Article extends Component {
state = {
article: {},
... |
var express = require('express'),
dbHelper = require('./db.js'),
app = express(),
database = {
HOST : 'localhost',
PORT : 27017,
DB_NAME : 'flashcards'
},
NODE_PORT = 3000;
// Set EJS as template engine
app.set('view engine', 'ejs');
// Use the bodyParser middleware to pars... |
import React, { Component } from 'react';
import {
View,
Image,
ScrollView,
WebView,
StyleSheet,
YellowBox,
Dimensions,
Platform
} from 'react-native';
import Pdf from 'react-native-pdf';
import { Button, Icon, Card, Text, CheckBox } from 'react-native-elements';
import { Actions } from 'react-native-ro... |
var Ucoin = artifacts.require("./Ucoin.sol");
module.exports = function(deployer) {
deployer.deploy(Ucoin);
}; |
app.controller('ApplicantsController', ['$scope', '$uibModal', 'databaseService', function($scope, $uibModal, databaseService){
$scope.pagination = {
currentPage: 1,
pageMaxSize: 5,
totalItems: 0,
itemsPerPage: 25
};
var animationsEnabled = true;
$scope.applican... |
var batas;
var signaturePad;
var file_now;
var file1 = null;
var file2 = null;
var file3 = null;
var send = true;
var dataT;
$(document).ready(function() {
klik_image();
klik_clear_signature();
klik_reset();
klik_send();
setup_signature();
$('.content1').css('width', ($('#one').width() - 30) + 'px');
$('b... |
var entities;
var segments;
var current_segment_start = -1;
var iframe = document.querySelector('iframe');
var player = new Vimeo.Player(iframe);
player.on('progress', function(data) {
on_player_progress(data['seconds'])
});
player.getVideoTitle().then(function(title) {
console.log('title:', title);
});
let r... |
import { Fragment } from 'react'
import themes from 'shared/themes/index.js'
import { ThemeIcon, DownIcon } from 'shared/components/icons.mjs'
import { useTranslation } from 'next-i18next'
import { Popover, Transition } from '@headlessui/react'
export const ns = ['themes']
export const ThemePicker = ({ app, iconOnly ... |
/**
* @param {number[]} nums
* @return {number}
*/
var lengthOfLIS = function(nums) {
if(nums.length === 0) return 0;
var dp = [1];
for(var i = 1; i<nums.length; i++) dp[i] =0;
var maxans = 1;
for(var i = 1; i<dp.length; i++) {
var maxval = 0;
for(var j = 0; j<i; j++) {
if(nums[i] > nums[j]) ... |
import React from 'react';
import './App.css';
import Boards from './components/Boards/Boards';
const App = (props) => {
return (
<div className="app">
<Boards dataBoard = { props.state.boards } />
</div>
);
}
export default App;
|
import React from 'react'
import { Container, Row, Col } from 'react-bootstrap';
export default function StartToNow() {
return (
<div className=" mx-3 my-5 py-5 " style={{backgroundColor:"#e0e3e5",borderRadius:"20px"}}>
<Container>
<Row>
<Col lg={4} md={4} sm={12}>
<h2>... |
#!/usr/bin/env node
var request = require('request'),
async = require('async'),
RSS = require('rss'),
cheerio = require('cheerio'),
fs = require('fs'),
mkdirp = require('mkdirp'),
path = require('path'),
ncp = require('ncp'),
... |
'use strict';
var rho = require('rho')
, BlockCompiler = rho.BlockCompiler
, InlineCompiler = rho.InlineCompiler
, SubWalker = rho.SubWalker
, cheerio = require('cheerio')
, utils = require('./utils')
, extend = require('extend');
/**
* Compiler extends the `BlockCompiler` from Rho and adds SemiQuiz
* s... |
// Knave 1.3.2
// Created by Brandon T. Wood on December 1st, 2013
// Knave is meant to be a combination Incremental Game, combining
// the best aspects of all to make a fun browser based hybrid people
// can pour their free time into.
// -- Index of Functions --
//Global Variables
//Init
//Load
//createChar
//charC... |
define([
'lib/config',
'common/modules/commercial/contributions-utilities'
], function (config, contributionsUtilities) {
return contributionsUtilities.makeABTest({
id: 'PaidContentVsOutbrain2',
start: '2017-04-24',
expiry: '2018-01-08',
author: 'Regis Kuckaertz / Lydia Shep... |
(function() {
// create modal function
var content = document.createElement("p");
content.className = "content";
var close = document.createElement("span");
close.className = "close";
close.innerHTML = '<i class="fas fa-times"></i>';
close.onclick = function() {
dismissModal();
}
var contentDiv ... |
import React, {useEffect} from "react";
import { styled, connect } from "frontity";
// COMPONENTS ::
// -------------------------
import Header from "./components/header";
import Footer from "./components/footer";
import Page from "./components/page";
import Post from "./components/post";
// PAGES ::
// -------------... |
$(function() {
$('a[href*=#]:not([href=#])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.lengt... |
//My idea
var str = " foo bar j";
var temp = [];
function trim(str) {
str.map(function (item) {
if (item) temp.push(item);
})
return temp.join('');
}
String.prototype.trim = function () {
return trim(this.split(' '));
}
console.log(str.trim().split(' '));
//The correct solution
String... |
"Use Strict"
console.log ( 1 + 2 );
console.log ( "The type is:" + typeof ( 1 + 2 );
console.log ( 6 % 4 );
console.log('3 + 4 is ' + (3 + 4));
|
;(function() {
'use strict';
var $taskDelete,
$taskDetailSwitch,
$taskDetail = $('.task-detail'),
$taskDetailMask = $('.task-detail-mask'),
taskList = [],
currentIndex,
$updataForm,
$taskDetailCont,
$taskDetailContInput,
$checkboxComplete,
$msg = $('.msg'),
$msgContent =... |
import React from 'react';
import Link from 'next/link';
import useSticky from '../../hooks/use-sticky';
import Sidebar from '../../components/common/off-canvas';
import NavMenus from './nav-menus';
import MobileMenu from './mobile-menu';
const Header = () => {
const { headerSticky } = useSticky();
const [sidebarO... |
app.factory('Meals', function() {
return {
all: function() {
var mealString = window.localStorage['meals'];
if(mealString) {
return angular.fromJson(mealString);
}
return [];
},
save: function(meals) {
window.localStorage['meals'] = angular.toJson(meals);
}
... |
var path = require('path');
module.exports = {
getExtension: function (url) {
return path.extname(url);
}
} |
function activityNotifications(expenditure, d) {
let m, newArr = new Array(201).fill(0), notifications = 0;
for (let i = 0, j = d; i < expenditure.length; i++, j++) {
if (expenditure[j] == undefined) break;
newArr = expenditure.slice(i, j).sort();
m = d % 2 != 0 ? newArr[Math.floor(newAr... |
class Maze {
constructor() {
this.rooms = [];
}
addRoom(room) {
this.rooms.push(room);
}
getRooms() {
return this.rooms;
}
clone () {
return new Maze();
}
}
module.exports = Maze;
|
const axios = require('axios');
const url = 'https://api.github.com/users/RocktimSaikia/repos?visibility=public&sort=created';
async function getName() {
try {
var { data } = await axios.get(url);
} catch (error) {
console.log(error.response);
return false;
}
const dataArr = [];
for (let i = 0; ... |
export const redDot = "http://maps.google.com/mapfiles/ms/icons/red-dot.png";
export const yellowDot = "http://maps.google.com/mapfiles/ms/icons/yellow-dot.png";
|
//global scope
const name = 'bobo';
//global variable can access from anywhere in the program
function calculate() {
console.log(name);
}
calculate();
//local scope
function todolist() {
let work = 'coding';
work = 'programming'
//if you don't declare the keyword for the variable it will t... |
'use strict';
/* global angular */
var greetingsApp = angular.module('greetingsApp');
// ----------------- Service with an Object-Oriented Loader ----------------- //
function GreetingsLoader($http) {
var greetingsJsonUrl = './resources/greetings.json';
this.getGreetings = function() {
return $http... |
export const baseUrl = process.env.REACT_APP_API_URL || 'http://localhost:4000';
export function get(url) {
return new Promise(resolve => {
setTimeout(
() => {
fetch(`${baseUrl}/${url}`)
.then(x => x.json())
.then(resolve);
},
1000
)
});
}
export function po... |
import { MongoClient } from 'mongodb';
const mongo = cb => {
MongoClient.connect(process.env.MONGO_URL, (err, db) => {
if (err) throw err;
cb(db.db(process.env.DB_NAME));
});
}
export default mongo;
|
var files________6____8js__8js_8js =
[
[ "files____6__8js_8js", "files________6____8js__8js_8js.html#afc3d20e2933d370f1582de01c62b1dc6", null ]
]; |
import React, {Component} from 'react'
const state = {
repeat: 1
}
export default class Repeat extends Component {
static state = state
state = state
onChange = e => {
const name = e.target.getAttribute('name')
let value = +e.target.value
if ('repeat' === name && value < 1) {
value = 1
... |
/* eslint-env node */
'use strict';
module.exports = {
startpage: require('./startpage'),
category: require('./category'),
post: require('./post'),
page: require('./page'),
custom: require('./custom')
};
|
//Require all mongoose models here
var users = require('./users.model');
var orders = require('./orders.model');
module.exports = {
users : users,
orders : orders
};
|
//currying function
//static function
//addSubtract(1)(2)(3)(4)(5)(6) -> 1 + 2 - 3 + 4 - 5 + 6 -> 5 etc.
function curry(fn) {
return (b) => {
return (c) =>{
return (d) => {
return (e) => {
return (f) => {
return (g) => {
return f... |
import actiontype from './Post.type'
const INITIAL_STATE = {
DATA: null,
Error:null,
loading:false
}
const Postreducer = (state=INITIAL_STATE, action)=>{
switch (action.type) {
case actiontype.POST_SUNDAY_MESSAGE_START:
case actiontype.POST_BIBLE_MESSAGE_START:
case actiontype.POST_BIBLE_MESSAGE_C... |
/*
*
* spec for my monitor
*
* author scoder
* date 2016
*
*/
describe('monitor',function(){
var m;
beforeEach(function(){
m = monitor();
});
it('should be a function',function(){
expect(monitor).toEqual(jasmine.any(Function));
});
it('should return an obj',function(){
expect(monitor()).toEqual(jasmine.an... |
import React from 'react';
import ContactsUser from './Contacts/ContactsUser'
const ContactsList = () => {
return (
<React.Fragment>
<ContactsUser />
</React.Fragment>
)
}
export default ContactsList; |
"use strict";
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(ex... |
import React, { lazy } from 'react';
import { Route } from 'react-router-dom';
import { push } from 'connected-react-router';
import Client from '../pages/client/client.connector';
export const renderClientsRoutes = ({ pages, modules }) =>
Object.values(pages).map(page => {
const { component, target, path, name ... |
var path = require('path');
var webpack = require('webpack');
var merge = require('merge');
//var ExtractTextPlugin = require('extract-text-webpack-plugin');
//var CommonsChunkPlugin = require("webpack/lib/optimize/CommonsChunkPlugin");
var webpackConfig = {
output: {
path: path.join(__dirname, '/js/dist/'... |
$(document).ready(function() {
$('#logout').bind("ajax:success", function() {
window.location = "/";
});
}); |
import Spa_util from './spa.util';
import Spa_util_b from './spa.util_b';
require("../styles/sass/spa.chat.scss");
/**
* * a function that provides capability to adjust the chat URI anchor parameter
* * an object that provides methods for sending and receiving messages (from the Model)
* * an object that provide... |
/*
Assume you have a method isSubstring which checks if one word is a substring
of another Given two strings, s1 and s2, write code to check if s2 is a
rotation of s1 using only one call to isSubstring.
*/
var isSubstring = function(s1, s2) {
return s1.indexOf(s2) !== -1
}
module.exports = function(s1, s2) {
... |
/**
* @author xlg
* @version 2018-07-02
*/
// 地图圈选对象保存
var map = null;
var layer = null; // 点
var circle = null; // 框
var eMap = null;
var latlng = null;
var wfs = null;
var caseAddressBtn = $('#caseAddressBtn'); // 标注案发地点按钮
var caseRange = $('#caseRange'); // 案发地点半径范围
// 研判条件
var beginTimeO... |
const { geolocation } = navigator
const DEFAULT_SETTINGS = {
maximumAge: 30 * 1000,
enableHighAccuracy: false
}
class LocationMonitor {
constructor(options) {
this._settings = {
...DEFAULT_SETTINGS,
...options
}
this._locationWatchId = null
this._subscribers = []
}
setOptions(o... |
import React from 'react';
import { Card, Icon } from 'semantic-ui-react';
export default class SolarSystemCard extends React.Component {
render() {
// console.log("card", this.props)
return (
<Card className="SolarCard" centered="true" fluid="true" color="green" onClick={(event) => this.props.handleSe... |
/** @jsx React.DOM */
// Model Basics
// ------------
// A model is merely a basic javascript object that can be instantiated either
// with data or with just an id. The model is always in one of those states,
// loaded (ie. has data), or not loaded (ie. does not have data). The load
// function is responsible for loa... |
let Movie = require('./schema');
module.exports = {
getAllMovieDetails: function (callback, limit) {
Movie.find(callback).limit(limit);
},
searchMovie: function (query, callback) {
Movie.find({ 'name': { $regex: query.toString(), $options: 'i' } }, callback);
},
deleteMovie: funct... |
import React, {Component} from 'react'
import { Text, StyleSheet, View, Button } from 'react-native'
export default class ServerExample extends Component {
constructor(props){
super(props)
this.state = {
response: "Click to connect to the server"
}
}
c... |
'use strict';
angular.module('version', [
'versionInterpolateFilter',
'versionDirective'
])
.value('version', '0.1');
|
import main from '../..'
import map from 'ramda/src/map'
import propEq from 'ramda/src/propEq'
import filter from 'ramda/src/filter'
import always from '../../signals/processes/always'
import pipe from '../../signals/pipe'
import preventDefault from '../../processes/preventDefault'
import css from './styles.css'
const... |
import React from 'react'
import './SplitArticle.css'
const url = "https://ktla.com/wp-content/uploads/sites/4/2021/07/GettyImages-1326308693.jpg?w=1280";
function SplitArticle() {
return (
<div className="split-article-container">
<div className="split-article-left">
<h1 class... |
function getDirection() {
if ((route[wayPointCount][0] == route[wayPointCount + 1][0]) && (route[wayPointCount][1] > route[wayPointCount + 1][1])) {
Eugen.setRow(0);
}
else if ((route[wayPointCount][0] < route[wayPointCount + 1][0]) && (route[wayPointCount][1] > route[wayPointCount + 1][1])) {
var ratio = (Math... |
function getFirstSelector(selector) {
return document.querySelector(selector)
}
function nestedTarget(){
return document.querySelector('div.target')
}
function increaseRankBy(n){
let list = document.querySelectorAll('ul.ranked-list')
for (let i = 0; i < list.length; i++){
let newInner = parseInt(list[i].i... |
/*global ODSA */
$(document).ready(function() {
"use strict";
var av_name = "LazyLists4CON"; // Illustrate and develop the is.map function
var av = new JSAV(av_name);
var code = ODSA.UTILS.loadConfig({av_name: av_name}).code;
var pseudo = av.code(code[0]).show();
var leftMargin = 10;
var o... |
"use strict";
var plugin = {},
http = require('http'),
jsdom = require("jsdom"),
fivebeans = require('fivebeans'),
string = require('string'),
fs = require('fs-extra'),
jquery = fs.readFileSync("./node_modules/nodebb-plugin-kernel/static/jquery-2.1.4.min.js", "utf-8"),
async = module.parent.require('async'),
topics = ... |
function catchAsync(fn) {
return function(req , res , next) {
fn(req , res , next).catch(next);
}
};
module.exports = catchAsync; |
/**
* Module Dependencies
*/
// ...
// e.g.
// var _ = require('lodash');
// var mysql = require('node-mysql');
// ...
var crypto = require('crypto');
var firebase = require('firebase');
var FirebaseTokenGenerator = require("firebase-token-generator");
var Errors = require('waterline-errors');
var waterlinefilter = ... |
import axios from 'axios';
import {
BACKGROUND_COLOR_DEAFUALT,
URL_FETCH_USER,
URL_SEED,
URL_RESULTS,
URL_INC
} from '../utils/constants'
export const fetchUsers = (indexData)=>{
return new Promise((resolve,reject)=>{
axios.get(`${URL_FETCH_USER}?seed=${URL_SEED}&results=${URL_RES... |
const multer = require('multer');
const response = require('../res');
const connection = require('../conn');
const path = require('path');
exports.FileUpload = function (req, res) {
const storage = multer.diskStorage({
destination : './uploads/bpsdm',
filename: function(req, file, cb){
... |
/**
* HtmlTables, interaction script v1.0.0
* All related to the html tables demo.
*
* Copyright 2018, 5studios
* http://www.5studios.net
*/
'use strict';
(function($, data, $scope) {
$(function() {
$scope.table = $("#html-table");
$("thead th", $scope.table).each(function(i, ... |
/**
* Created by Osvaldo on 23/09/15.
*/
app.controller("homeController",['$scope', "$location", 'getUserLogado', function ($scope, $location, getUserLogado) {
var me = this;
me.listeners = {};
$scope.userLogado = getUserLogado.getLogado();
$scope.listaestoque = 'essa é a lista do estoque';
$sc... |
exports.deadFish = function() {
console.log("Out of energy");
};
exports.knuckleCruncher = function() {
console.log("Over control");
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.