text stringlengths 7 3.69M |
|---|
(function () {
"use strict";
for (let i = 1; i < 100; i+=2) {
console.log(i);
if (i === 27) {
console.log('We have reached the stopping point: break!');
break;
console.log('You will never see this line.');
}
}
}
)() |
import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'
import { fetchCount } from './counterAPI'
const initialState = {
value: 10,
status: 'idle',
hour: 1,
minute: 0,
second: 5,
runTimer: false,
Q_id: 1,
answer: "",
login: false,
data: {}
}
// The function below is called a thunk and all... |
import React from 'react';
import {useStyles} from "./style";
import {Container} from "@material-ui/core";
import Grid from "@material-ui/core/Grid";
import Typography from "@material-ui/core/Typography";
import MongoDBLogo from './sponsors/MongoDBLogo_800px.png';
import GCPLogo from './sponsors/GCPLogo_800px.png';
im... |
module.exports = (function(settings) {
// here we can modify settings on the fly
// like system passes etc.
return settings;
})(require('./nightwatch.json'));
|
export default {
name: "StartScene", //Scene name
children: [ //Game objects in the scene
{
gameObject: {
name: "MainCamera", components: [
{ name: "WorldCameraComponent",
args: ["rgba(131, 215, 131, 1)"]}
]
}, sx: 20, sy: 20,
},
{
... |
import React from 'react'
import { mount } from 'enzyme'
import IconButton from '@material-ui/core/IconButton'
import Typography from '@material-ui/core/Typography'
import { getAsync } from 'reforma/api'
import { getTableProps } from 'Test/factories'
import Pagination from '../Pagination'
describe('<Pagination />', ()... |
import React, { } from 'react'
import { View, Text } from 'react-native'
import SafeAreaView from 'react-native-safe-area-view'
import { IconButton } from '@components'
import styles from './About.style'
import { Colors } from '@constants'
const BACK_ICON = require('@images/icon/left-arrow.png')
const About = (props... |
import React from 'react'
import {Link} from "react-router-dom"
import PropTypes from 'prop-types'
import {connect} from "react-redux"
import Moment from "react-moment"
const CommentItem = ({postId, comment: {text, name, photo, user, date}}) => {
return (
<div className="media mb-4">
<hr/>
<img... |
/*
输入二叉搜索树,转换成排序的双向链表。
要求:不能创建任何新结点,只能调整树结点指针的指向。
*/
|
#!/usr/bin/env node
//Echo client program
var net = require('net');
var fs = require('fs');
var Future = require('fibers/future'), wait = Future.wait;
var stime=new Date().getTime();
function tryToConnect( ip, port, callback ){
var socket = net.createConnection(port, ip);
socket.on('error', function(err){... |
import React, { useState, useEffect } from 'react';
import {
View,
Text,
StyleSheet,
FlatList,
TouchableOpacity,
ScrollView
} from 'react-native';
import { ListItem, Avatar } from 'react-native-elements'
import axios from 'axios';
function HomeScreen({ navigation }) {
const [programs, setPrograms] = use... |
alert("Hello Admin !!"); |
/* UserModel.js */
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('./SSNocDB.db');
var crypto = require('crypto');
//this function is to encrypt the password using sha1
function hashPassword(passwords, salts) {
var hash = crypto.createHash('sha1');
hash.update(passwords);
hash.up... |
import React from "react";
import { storiesOf } from "@storybook/react";
// components
import CardGroup from "../CardGroup";
// CardGroup section
storiesOf("CardGroup", module)
.addParameters({
// default for all stories in this book
info: {
inline: true,
header: false
}
})
.add("show Ca... |
import React from 'react';
import Carousel from '../../components/carousel/Carousel';
import Trending from '../../components/trending/Trending';
import Offer from '../../components/offer/Offer';
import BestSeller from '../../components/best-seller/BestSeller';
import Blog from '../../components/blog/Blog';
import Subsc... |
// Ternário
condicao ? varlor1 : valor2
true ? 'foo' : 'bar' // Retorna 'foo'.
false ? 'foo' : 'bar' // Retorna 'bar'. |
export const FETCH_ALL_ZONE_PENDING = 'FETCH_ALL_ZONE_PENDING';
export const FETCH_ALL_ZONE_SUCCESS = 'FETCH_ALL_ZONE_SUCCESS';
export const FETCH_ALL_ZONE_FAILURE = 'FETCH_ALL_ZONE_FAILURE';
export const SET_ZONE_PENDING = 'SET_ZONE_PENDING';
export const SET_ZONE_SUCCESS = 'SET_ZONE_SUCCESS';
export const SET_ZONE_F... |
import express from "express";
import {
getTodos,
getTodoById,
createTodo,
deleteTodoById,
toggleTodoCompleted,
updateTodoDescriptionByID,
} from "../controllers/todoController";
const debug = require("debug")("server:debug");
const router = express.Router();
router.get("/todos", async (req, res) => {
... |
(function() {
dojo.provide("org.dojotoolkit.zazl.helloworld.HelloWorldContext");
dojo.declare("org.dojotoolkit.zazl.helloworld.HelloWorldContext", null, {
templatePath: dojo.moduleUrl("org.dojotoolkit.zazl.helloworld", "helloworld.dtl"),
constructor: function(args, request) {
this.contextRoot = request.contex... |
//------------------------------------------------------------------------
// Exports
module.exports = {
extractAuthorizationInfo: function(req, res, next) {
try {
if (!req.headers.authorization)
return res.status(401).json({message: 'missing authorization info'});
... |
const database = require("./database"); //import the file database.js and create the dependency. (just like html, css and js)
// query(what query to run, what to do with the results -> callback function)
//this query below will return a JSON object (separate by commas)
database.connection.query( //connection here me... |
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles, makeStyles, useTheme } from '@material-ui/core/styles';
import Table from '@material-ui/core/Table';
import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
import TableContainer from '@... |
var assert = require('assert'),
_ = require('lodash'),
cvvNs = require('./cvv'),
ContextualVV = cvvNs.ContextualVV;
describe('isVsnNew(id, vsn, kMap)', function() {
it('should throw an error if `vsn` is not a number', function() {
var fn,
callArgs = [
['id', [], ... |
/* global danger, markdown, warn */
import parseCoverage from 'byzantine'
import fs from 'fs'
import { includes, forEach, keyBy, groupBy } from 'lodash'
import path from 'path'
import generateMarkdownTable from 'markdown-table'
const rootDir = process.cwd()
const getFileAbsolutePath = filePath => path.join(rootDir, fi... |
import React from 'react';
const HelloWorld = () => (
<p>Profile</p>
);
export default HelloWorld;
|
var express = require('express');
var router = express.Router();
//var mongodb = require('mongodb');
var passport = require('passport');
var LocalStrategy = require('passport-local').Strategy;
//var User = require('../models/user');
var Awards = require('../models/award');
var awards = require('../controllers... |
/* jshint undef: true, unused: true */
/* global Whelps */
Whelps.Views.Root = Backbone.CompositeView.extend ({
template: JST['root'],
render: function () {
var content = this.template ({
venues: this.venuesCollection
});
this.$el.html(content);
// render subviews...
this.attachSubviews(... |
import big from './../assets/big.jpg';
import small from '../assets/small.jpg';
import '../styles/image_viewer.css';
const image= document.createElement('img');
image.src=big;
document.body.appendChild(image);
const smallImage= document.createElement('img');
smallImage.src=small;
document.body.appendChild(smallImage... |
define([
'apps/system3/admin/admin'], function (app) {
app.module.factory("adminService", function ($rootScope, Restangular, stdApiUrl, stdApiVersion) {
var restSrv = Restangular.withConfig(function (configSetter) {
configSetter.setBaseUrl(stdApiUrl + stdApiVersion);
})
retur... |
//Need to add Post Img! => ADDED!!!!!! WOOHOOO!!!
import React, {useState, useEffect} from 'react';
import PostCommentList from './PostCommentList'
import PostEditForm from './PostEditForm';
import PostReportList from './PostReportList'
function PostCard({postId, currentUser, deletePost}){
const emptyPostHolder ... |
describe('scomos helper',function(){
describe('shape Helper',function(){
var shapeUtil = d3scomos.shapeUtil;
it('getEllipse : should return ellipse with passed dimensions',function(){
var path = shapeUtil.getEllipse(60, 100, 10, 20);
expect(path).to.have.string('M60 20A 50 30 0 0 0 60 80A 50 30 0 0 0 ... |
let a = 10 ;
a = 20 ;
var b = true;
b = false ;
const a = 10 ;
a = 20 ;
console.log(a) ; |
import React from 'react';
import { View, StyleSheet } from 'react-native';
import { isFunction } from 'lodash';
import Button from './Button';
import Label from './Label';
import { layout, colors } from '../constants';
const paddingBase = layout.gridUnit * 2;
const styles = StyleSheet.create({
row_view: {
he... |
import React, { Component } from 'react';
import { Card, CardBody, CardHeader, Col, Row, Table, FormGroup, Input, Label } from 'reactstrap';
const CardNumberData = [
{id: 'SI10', price: '10.000'},
{id: 'SI20', price: '20.000'},
{id: 'SI30', price: '30.000'},
{id: 'SI30', price: '40.000'}
]
export def... |
$(function () {
// 实现数据动态渲染,并且能实现分页功能
var pagenum = 1 //页码
var pagesize = 2 //页中显示的条数
// 第一次请求时获取所有数据,进行页面动态渲染
getAjax()
function getAjax(query) {
// console.log(query);
$.ajax({
type: 'get',
url: '/getAllPost', //文件接口
data: {
... |
import Validation from '../../modules/Validation'
import AnswerModel from './model'
export const Create = async (req, res) => {
// Валидируем полученные данные
const error = await Validation.Check({
fields: req.body,
rules: [
'question_id_required', 'question_id_invalid', 'question_not_found_by_id'... |
const express = require('express')
const quizController = require('../controllers/quizController')
const router = express.Router()
// GET request to display quiz home.
router.get('/', quizController.quiz_home_get)
// Reset user variables and start quiz if user is logged in.
router.get('/quiz-start', quizController.q... |
// Declaração de função (Function hoisting)
function sayHi() {
console.log('Oi');
}
// First-class objects (objetos de primeira classe)
// Function expression
const amAData = function() {
console.log('Sou um dado');
};
function execFunction(func) {
func();
}
amAData();
// Arrow function
const arrowFun... |
// ==========
// Tile stuff
// ==========
"use strict";
/* jshint browser: true, devel: true, globalstrict: true */
//Tile object
function Tile(x, y, type, pos) {
this.x = x;
this.y = y;
this.type = type;
this.pos = pos;
}
//drawing tiles stuff
Tile.prototype.makeTile = function(ctx, x, y, type) {
... |
/* 🤖 this file was generated by svg-to-ts*/
export const EOSIconsFlashOff = {
name: 'flash_off',
data: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3.27 3L2 4.27l5 5V13h3v9l3.58-6.14L17.73 20 19 18.73 3.27 3zM17 10h-4l4-8H7v2.18l8.46 8.46L17 10z"/></svg>`
};
|
orion.config.add('MAIL_NAME', 'contact')
orion.config.add('MAIL_EMAILTO', 'contact')
orion.config.add('MAIL_EMAILFROM', 'contact')
orion.config.add('KAD_APPID', 'kadira')
orion.config.add('KAD_APISECRET', 'kadira')
|
import handleBeerItemsSubstitution from "./searchSubmitCases/handleBeerItemsSubstitution.js";
import handleEmptyResponse from "./searchSubmitCases/handleEmptyResponse.js";
import { scrollToFirstItem } from "../../../../utils/scroll.js";
import {
actionOnServerResponse,
someBeersWereRendered,
} from "../../../../uti... |
import { Alert, Button, Container, Rating, Snackbar, TextField, Typography } from '@mui/material';
import axios from 'axios';
import React, { useState } from 'react';
import useAuth from '../../../hooks/useAuth';
const UserReview = () => {
const [open, setOpen] = React.useState(false);
const { user } = useAuth... |
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
// Load grunt tasks automatically
require('load-grunt-tasks')(grunt);
... |
define({
"root": {
"pitchTxt":"Experience a free peer-to-peer slideshow.<br>Enjoy the simplicity and the beauty of real time sharing. Forget uploading and waiting.<br>View pictures together with your loved ones.",
// Step one
"createHeader":"Create",
"createTxt":"a session by providi... |
var fs = require('fs'),
configPath = './config.json'
var parsed = JSON.parse(fs.readFileSync(configPath, 'UTF-8'))
exports.db = parsed
|
(function () {
'use strict'
angular
.module('myApp')
.controller('SidebarController', SidebarController);
SidebarController.$inject = ['processEngine', '$state'];
function SidebarController(processEngine, $state) {
var vm = this;
}
})(); |
(function() {
var query, request, suggest, iconv;
request = require('request');
iconv = conv = require('iconv-lite');
suggest = function(query, cb) {
var url;
url = "http://suggestqueries.google.com/complete/search?hl=tr&client=firefox&q=" + (encodeURIComponent(query));
return request.get({
... |
//+$trad(1,i3GEOadmin.principal.dicionario)+
//i3GEOadmin.grupos = {};
i3GEOadmin.grupos.dicionario = {
'msgBuscaGrupos' : [ {
pt : "buscando grupos...",
en : "",
es : ""
} ],
'nomePadrao' : [ {
pt : "Nome padrão:",
en : "",
es : ""
} ],
'descricao' : [ {
pt : "Descrição (o... |
import { combineReducers } from 'redux'
/** reducers imports */
import started from '../actions/GetStarted/reducer'
import content from '../actions/Content/reducer'
import User from '../routes/User/reducer'
import login from '../actions/Login/reducer'
import layout from '../actions/Layout/reducer'
import lore from '..... |
//4
function adivNum(){
let array=[];
let num=parseInt(prompt("Adivine el numero entre 1-20"))
for(let i=0; i<array.length; i++){
array.push(math.floor(math.random()*20)+1);
} if(array.indexOf(num)!=-1){
console.log("Gano");
} else{
console.log("Perdio");
}
} |
//import Phaser from 'https://cdn.jsdelivr.net/npm/phaser@3.14.0/dist/phaser.js';
const config = {
type: Phaser.AUTO, // Which renderer to use
width: window.innerWidth, // Canvas width in pixels
height: window.innerHeight, // Canvas height in pixels
parent: 'game-container', // ID of the DOM element to add the... |
import React, { Component } from 'react';
import { Dialog,createMuiTheme,MuiThemeProvider } from '@material-ui/core';
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import Iframe from 'react-iframe';
import style from './BridgeLabzSpeak.less'
import { CLOSE_DIALOG } from '../../co... |
import axios from 'axios'
export const fetchParticipations = (state) => {
return new Promise((resolve, reject) => {
axios.get('participation')
.then((participations) => {
state.commit('SET_PARTICIPATIONS', participations.data.data)
resolve()
})
})
}
export const deleteParticipation = (state, partici... |
"use strict";
class DateTest{
constructor()
{
this.times=[];
this.end=[];
}
time(label)
{
this.times[label]=Date.now();
}
timeEnd(label)
{
let time = this.times[label];
if (!time) {
throw new Error('No such label: ' + label);
}
var duration = Date.now() - time;
this... |
import React from 'react';
import {AppRegistry, Text, View, TouchableHighlight, WebView} from "react-native";
export default class App extends React.Component {
constructor( props ) {
super( props );
this.webView = null;
}
onMessage( event ) {
console.log( "On Message", event.native... |
angular.module("verificaciones").run(function ($rootScope, $state, toastr) {
$rootScope.$on('$stateChangeError', function (event, toState, toParams, fromState, fromParams, error) {
switch(error) {
case "AUTH_REQUIRED":
$state.go('anon.login');
break;
case "FORBIDDEN":
//$state.... |
exports.data = function(){
return [
{
route: '/index',
handle: function(req,res,next){
res.writeHead(200,{
"content-type": "application/json;charset=utf-8",
"Access-Control-Allow-Origin": '*'
});
... |
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
module.exports = function(mongoose){
var SeatSchema = new Schema({
number: String,
group: String,
fee: Number,
isOnHold: Boolean,
isReserved: Boolean
});
var PlaneConfigurationSchema = new S... |
import React, {PureComponent} from 'react';
import PropTypes from "prop-types";
import validator from "email-validator";
const withErrorItem = (Component) => {
class WithErrorItem extends PureComponent {
constructor(props) {
super(props);
this.state = {
loginError: false,
passwordEr... |
import React, { useState } from 'react';
import { Link } from 'react-router-dom';
import NProgress from 'nprogress';
import '../Pages/nprogress.css';
// to add search bar suggestions and make api calls on submit
function SearchBar() {
const [inputt, setinputt] = useState("");
const [suggArray, setsuggArray]... |
var thumb136="TkSWZ9/CYkrrc5VP0dIfEmWzpWcz3FP6jmPx9rlbjigAvDzIbgJzza2DuUGJO6ELfhjc1KFIUqlRn/gKsUwjzdDI+u7b9DM4XSUJjXksWz75BgmIezs7U8NrvrjAeZM3aoDLh2QaGueSvvnvKy60DtVP2IpMfLmGxy4QsspuS15GGUmskpI2nEIkTzKIrx5FfQLgvR05DCeSipF0IRMtlJhxv1Y23hRERL6tT8xld0ZQVa/d6rc/T05mNT/a1jEHPCBUwoeuVqk9bZh5UqOS1tY9fL/ItP3U//jKqt7/mh0II7ZUW... |
function responsiveFunction() { // Fonction qui ajoute la classe "responsif" ou l'enlève si elle a déjà été rajoutée
var x = document.getElementById("menu");
if (x.className === "barrenav") {
x.className += " responsif";
} else {
x.className = "barrenav";
}
} |
var searchData=
[
['clientproccess',['clientProccess',['../server_8c.html#a05e3acaef1809e7e10f3c66dd0f5ca41',1,'server.c']]],
['closetcpsocket',['closeTCPSocket',['../tcp_8c.html#ac632aaf210f4e9328fc4551f5164d17e',1,'closeTCPSocket(const int socketFD): tcp.c'],['../tcp_8h.html#ac632aaf210f4e9328fc4551f5164d17e... |
/*
This file is part of nibble.
nibble 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 3 of the License, or
(at your option) any later version.
nibble is distributed in the hope that it will be... |
import dotenv from 'dotenv'
dotenv.config()
export default {
node_env: process.env.NODE_ENV,
port: process.env.PORT,
pg_host: process.env.PG_HOST,
pg_port: process.env.PG_PORT,
pg_database: process.env.PG_DATABASE,
pg_user: process.env.PG_USER,
pg_password: process.env.PG_PASSWORD
} |
window.onload = function () {
var readme = document.querySelector('#readme');
if (readme) {
var readmeParent = readme.parentElement;
var disqusContainer = document.createElement("div");
disqusContainer.setAttribute("id", "disqus_thread");
readmeParent.appendChild(disqusContainer)... |
import React, {useState, useEffect} from 'react';
import {
StyleSheet,
Text,
View,
ScrollView,
Image,
TouchableHighlight,
TouchableOpacity,
Alert,
} from 'react-native';
import AsyncStorage from '@react-native-async-storage/async-storage';
import {API_URL} from '@env';
import axios from 'axios';
import ... |
const data = './AnnihilationTweets.csv'
const csv = require('csvtojson')
const fs = require('fs');
csv({
checkType:true
})
.fromFile(data)
.then((jsonObject) => {
let jsonString = JSON.stringify(jsonObject, null, " ");
fs.writeFileSync('./src/AnnihilationTweets.json', jsonString);
}) |
import React, { Component } from 'react'
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'
import {fetchUser} from '../redux/actions/index'
import FeedScreen from './main/Feed'
const Tab = createBottomTabNavigator();
... |
import React from 'react';
import './NotFound.css'
const NotFond = () => {
return (
<div className='bgBody'>
<h1 className='error'>404 (Sorry, Root Not Found. Go Back!)</h1>
</div>
);
};
export default NotFond; |
import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import { addLocaleData, IntlProvider } from 'react-intl';
import { Provider } from 'react-redux';
import App from './containers/App';
import configureStore from './store/configureStore';
const locale = window.LOCALE;
if (!global.I... |
MyApp.controller('AboutController', about);
function about($scope)
{
$scope.name = "genevieve.nant@gmail.com";
} |
import styled from 'styled-components/macro'
export const Root = styled.footer`
background-color: ${({ theme }) => theme.main};
color: ${({ theme }) => theme.textInv};
flex-flow: column nowrap;
align-content: center;
align-items: center;
height: 80px;
`
|
import React, { Component } from "react";
import About from "./pages/About/About";
class DescBox extends Component {
state = {
show: false
};
showModal = () => {
this.setState({ show: true });
};
hideModal = () => {
this.setState({ show: false });
};
render() {
return (
<div className="div1">
<d... |
var app=angular.module('fangxingmall',[]); |
import * as actions from "../reducers/color-picker-reducer.js";
export function onRemoveColor(colorId) {
return {
type: actions.REMOVE_COLOR,
colorId: colorId
}
}
export function onAddColor(title, color) {
return {
type: actions.ADD_COLOR,
payload: {
title: titl... |
/**
* Apple Model: A simple model example
*/
restless.Model('Apple', CommonApple, class {
onPreGet(){
if(ROLE !== 'admin') throw 'no right!';
}
onPostGet(){
this.set('example.dynamic.requestTime',(new Date()).toString());
}
onPreRemove(){
if(ROLE !== 'admin') throw 'no right!';
}
onPostR... |
import State from '../GameMechanics/State.js';
import {GunShot} from '../particleSystem/GunShot.js';
import * as R from 'rodin/core';
import {audio} from '../sounds/gameSounds.js';
/**
* Shot
*/
const shot = (evt) => {
const gunShot = new GunShot(evt.globals.gun, evt.globals.ball.globalPosition);
R.Scene.add... |
import React from 'react';
import Layout from '../core/Layout';
const Private = () => (
<Layout>
<h1>Subscriber page pls change in DB role of your account from "subscriber" to "admin".</h1>
<p>Thank you!!!</p>
</Layout>
);
export default Private; |
import React from 'react';
import { connect } from 'react-redux';
import {ListView, StyleSheet} from 'react-native';
import {Avatar, Colors, Typography, View} from 'react-native-ui-lib';//eslint-disable-line
import autobind from 'react-autobind';
import { selectGroup, fetchGroups } from '../../actions/group_actions';
... |
import React from "react";
import styles from './Carousel.module.css';
const Carousel = (props) => {
return (
<div className={styles.Container}>
carousel it is.
</div>
)
}
export default Carousel; |
var knox = require('knox');
var client = knox.createClient({
key: 'AKIAIVBQVGKDRVQ46N2Q'
, secret: '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'
, bucket: 'scripts.accredor.com'
});
client.putFile('public/scripts/7615328.js', '/7615328.js', {'x-amz-acl' : 'public-read'}, function(err, res){
console.log(res);
})... |
//NOTA : en cada funcion de este modelo, deberia contener exclusivamente sentencias de comunicacion con mi base de datos ¿o no?
/**
* Este modelo debe tener las sentencias atomicas para comunicarse con database firebase.
* las funciones de createNode(), redProperty(), simuleFrame() deberian estar en el nodoZigbeeCo... |
import React, { useRef } from 'react';
import PropTypes from 'prop-types';
import { withRouter } from 'react-router-dom';
import { connect } from 'react-redux';
import { FaFilter } from 'react-icons/fa';
import action from '../../actions';
import Button from '../Button';
import useClickOutside from '../../hooks/useClic... |
export default {
"device": 'Device',
"device.query": 'Query Device',
"device.ad-id": 'Ad ID',
"device.api-version-code": 'API Version Code',
"device.app-bundle-id": 'App Bundle ID',
"device.app-version-code": 'App Version Code',
"device.app-version-name": 'App Version Name',
"device... |
import socketIOClient from 'socket.io-client';
const endpoint = "http://localhost: 3993"
export const socket = socketIOClient(endpoint) |
var util = require('../../../utils/util.js')
var wegrouplib = require('../../common/lib/wegrouplib')
var weuploadlib = require('../../common/lib/weuploadlib')
var weuserlib = require('../../common/lib/weuserlib')
Page({
data: {
from: null,
group_id: null,
group: null,
targets: [],
target_index: 0... |
import React, { Component } from 'react';
import { View, Text, StatusBar, ScrollView, Alert } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import styles from './styles/info_styles'
import { info } from './api';
export default class Info extends Component {
static navigationOptions ... |
import React from "react";
import ReactDOM from "react-dom";
import { Provider } from "react-redux";
import store from "./Store/rootReducer";
import { BrowserRouter as Router, Switch, Route } from "react-router-dom";
import { App } from "./App";
import { ValidateEmail } from "./Components/ValidateEmail";
const rootEl... |
angular.module('taxonomy', [
'ngResource', //$resource for taxonomoy
'sockjs' //sock for TaxonomyRankingCache
])
.factory('TaxonomyRankingResource', function ($resource) {
var TaxonomyRankingResource = $resource(
'/1.0/taxonomy/:Term/ranking',
{ Term: '@Term' },
{
update: { method: 'PUT' }
}
);
return... |
'use strict';
// elems from html
var shoppingBagHTML = document.querySelector('.shopping-bag_products');
var emptyBagBtn = document.querySelector('.shopping-bag_empty-bag');
var totalPrice = document.querySelector('.total-price');
// get shoppingBag from LS
var shoppingBag = getFromLS('shoppingBag') || [];
// if sho... |
const express = require("express");
const router = express.Router();
//Controllers
const Product = require("../controller/productController");
const Dashbord = require("../controller/dashboardController");
//Routes
//Products
//Add new product
router.post("/add", Product.createNewProduct);
//Get all products
router.... |
import React from "react";
import PropTypes from "prop-types";
import debounce from "lodash.debounce";
import Input from "@paprika/input";
import SearchIcon from "@paprika/icon/lib/Search";
import useI18n from "@paprika/l10n/lib/useI18n";
import * as sc from "./SearchInput.styles";
export default function SearchInput(... |
// pages/sendhomework/sendhomework.js
// const recorderManager = wx.getRecorderManager()
// const innerAudioContext = wx.createInnerAudioContext()
var voice = "";
let app = getApp();
let baseUrl = app.globalData.baseUrl;
const utils = require('../../utils/util.js')
const regeneratorRuntime = require('../../lib/runtime... |
/*Return true if the given string is a palindrome. Otherwise, return false.
A palindrome is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing.
Note
You'll need to remove all non-alphanumeric characters (punctuation, spaces and symbols) and turn everything... |
import React from 'react';
import {connect} from 'react-redux';
import PropTypes from 'prop-types';
import {PageHeader} from '../../general/BootstrapComponents';
import LogFilters from './LogFilters';
import {changeFilter, requestLogReload} from '../../../actions';
import LogTable from './LogTable';
import I18n from '.... |
import React, { Fragment } from 'react'
import styled from 'styled-components'
const Viewer = () => {
return (
<Fragment>
<Container>
<Wrap>
<img src="/images/viewers-disney.png" alt="disney"/>
<video autoPlay={true} loop={true} playsInli... |
import axios, { ERROR_CODES } from '../../api/config';
export const REQUEST_STATS = 'REQUEST_STATS';
export const RECEIVE_STATS = 'RECEIVE_STATS';
export const NOTIFY_REQUEST_STATS_FAILURE = 'NOTIFY_REQUEST_STATS_FAILURE';
export function requestStats(){
return {
type: REQUEST_STATS
}
}
export func... |
// @flow
import { OPERATION_GET_ENTITY } from "lk/operations.js";
import { getLKQuery } from "lk/redux/actions.js";
export function getEntity( entity: string, id: number | string, onSuccess, onFail )
{
if( !entity || entity === "" )
{
onFail( "Entity not set" );
return;
}
if( !id || id === "" || id === 0 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.