blob_id
stringlengths
40
40
language
stringclasses
1 value
repo_name
stringlengths
5
132
path
stringlengths
3
236
src_encoding
stringclasses
29 values
length_bytes
int64
8
7.94M
score
float64
2.52
5.72
int_score
int64
3
5
detected_licenses
listlengths
0
142
license_type
stringclasses
2 values
text
stringlengths
8
7.94M
download_success
bool
1 class
7fd986db83c39e150c009e98753cd68e74cc42fa
JavaScript
ollieloney95/tree-editable
/src/node.js
UTF-8
4,764
2.84375
3
[]
no_license
import _ from 'lodash' export const hovering = { ABOVE: 'above', BELOW: 'below', IN: 'in', NONE: 'none' } export class Node { constructor(name, children, parent) { this.name = name this.children = children this.parent = parent this.position = null this.hovering = hovering.NONE ...
true
27fca67dae7e65a72637a937836cce3a2285239e
JavaScript
thainaferreira/ClassApp
/src/providers/Class/index.jsx
UTF-8
1,533
2.578125
3
[]
no_license
import { createContext, useContext, useEffect, useState } from "react"; import api from "../../services/api"; export const ClassesContext = createContext(); export const ClassProvider = ({ children }) => { const [classes, setClasses] = useState([]); const [classUser, setClassUser] = useState([]); const token =...
true
bce0902dcfad9dde9fa3826097727b5559534c8b
JavaScript
Ericil/mingrui_li
/hw01/stuff.js
UTF-8
603
3.015625
3
[]
no_license
var c = document.getElementById("canvas"); var button = document.getElementById("button"); var ctx = c.getContext("2d"); ctx.beginPath(); var point = function point(a){ a.preventDefault(); ctx.lineTo(a.offsetX, a.offsetY); ctx.closePath(); ctx.stroke(); ctx.beginPath(); ctx.arc(a.offsetX,a.off...
true
6fa66be831251837edb1d6f56495b7fe990f81b9
JavaScript
munro98/NodeJSMultiplayerTopdownShooter
/src/GameManager.js
UTF-8
1,542
3.3125
3
[]
no_license
'use strict'; class GameManager { constructor() { this.states = { WARMUP: 0, PLAYING: 1, INTERMISSION: 2, END: 3 }; this.warmupLength = 5; this.roundLength = 10; this.intermissionLength = 8; this.noRounds = 3; this.state = this.states.WARMUP; this.time = 0; this.round = 0; this.is...
true
93ea8c140498ec949db86356ed59f01cbf2f7b9d
JavaScript
vienpham2019/leecode_practice
/easy/min_stack.js
UTF-8
2,351
4.78125
5
[]
no_license
// Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. // push(x) -- Push element x onto stack. // pop() -- Removes the element on top of the stack. // top() -- Get the top element. // getMin() -- Retrieve the minimum element in the stack. // Example 1: // Input // ["M...
true
2575a68131d11c3183e2fae692b88817d2290f5e
JavaScript
jonatanklosko/internationalize
/client/app/services/translation-utils.service.js
UTF-8
21,670
2.53125
3
[]
no_license
import * as _ from 'lodash'; import yaml from 'js-yaml'; import sha1 from 'js-sha1'; import localesWithpluralizationKeys from './pluralization-keys.json'; /* Read ./notes.md for a clarification of how things are done. */ /** * A class meant for a translation data manipulation. */ export default class TranslationUti...
true
6430b049a269b2d1b12c01fc7125148180fd9b79
JavaScript
gitter-badger/kyu
/src/game.es6
UTF-8
701
3.640625
4
[]
no_license
import { KyuBoard } from "./board.es6"; /** * A game has two players and a Kyu board. * @class */ export class Game { constructor(player1 = null, player2 = null) { this.player1 = player1; this.player2 = player2; this.board = new KyuBoard(); this.isStarted = false; this.turn = null; } /** * Assig...
true
d398f765af14b8e960d70b186cae5f34c8d50822
JavaScript
bobd91/magedebugbar
/js/pageview.js
UTF-8
2,957
2.734375
3
[ "MIT" ]
permissive
/** * Displays a TreeGridView of layout for this page in a tab * * @module pageview * @author Bob Davison * @version 1.0 */ define(['jquery', 'class', 'cssclass', 'tabcontent', 'treegridview'], function($, Class, CssClass, TabContent, TreeGridView) { var cssClass = CssClass.generate('page', ['view']); ...
true
bacef883c15752685d2b74cf3fdf7f06e8de0e00
JavaScript
wecode-bootcamp-korea/19-1st-greatingdor-frontend
/src/Pages/SignUpDetail/SignUpDetail.js
UTF-8
5,810
2.59375
3
[]
no_license
/* eslint-disable prettier/prettier */ import React, { Component } from 'react'; import './SignUpDetail.scss'; class SignUpDetail extends Component { constructor() { super(); this.state = { name: '', id: '', password: '', emailAccount: '', emailWebsite: '', firstNumber: '01...
true
01cac34e15d84ad20f6d2fce0fcc310d752fb2c7
JavaScript
SPANDIAR/UIDevelopment
/udemy-mosh-js-prj/understandingArrays.js
UTF-8
3,468
3.9375
4
[]
no_license
let mixedArrayAddition = [3, 4, 6, 7]; let scrambledArray = [6, 5, 8, 3, 1, 15, 13]; let arrayToCombine1 = ['hello folks', 'check this out']; let arrayToCombine2 = ['I\'m learning JS']; let arrayToLearnRemoval = [1, 4, 'apple', 'sierra', 'middle', 'egg', 'water', 'a', 6]; let familyArray = [ { who: 'dad', ...
true
3e7cc25a20df89d8a452dc0cabd94a5cdff44736
JavaScript
satadeep3927/nera
/index.js
UTF-8
326
2.609375
3
[]
no_license
const hamburger = document.getElementById("hamburger") const navigation = document.getElementById("d-nav") hamburger.addEventListener("click",()=>{ navigation.classList.add("active") }) const active = document.getElementById("active-ham") active.addEventListener("click",()=>{ navigation.classList.remove("active...
true
aea3935d6b1b043394387960236f6f0147c7951c
JavaScript
rickyaco/Digital-House-Answers
/5A/Segunda Mitad (JavaScript)/Clase 05 - Practicas Juego Web/Actividad 05/JAVASCRIPT.js
UTF-8
258
3.328125
3
[]
no_license
// Copia y pega aquí el código JS del paso anterior. var hechizo = prompt("Tu elección es crítica: ¿Qué hechizo vas a usar?"); console.log(hechizo); document.getElementById("hechizoElegido").innerHTML = "Una sabia decisión, haber elegido " + hechizo;
true
48cecb69a1bb01ba96afc45ecebe963fa624ca22
JavaScript
Zhaniartt/JSCore
/JS Advanced/Classes-Exercises/4.Length Limit.js
UTF-8
889
3.734375
4
[]
no_license
class Stringer{ constructor(innerString,innerLength){ this.innerString = innerString; this.innerLength = innerLength; } increase(length){ this.innerLength += length; } decrease(length){ this.innerLength -= length; if(this.innerLength < 0){ this.inn...
true
f29dfc9dd6a5cf2783f7dced2c5e58d3f7a5a4c5
JavaScript
jhteja/primeraentrega
/primeroB.js
UTF-8
239
3.09375
3
[]
no_license
let promedio=(nota_uno, nota_dos, nota_tres,callback)=>{ setTimeout(function(){ let resultado=(nota_uno+nota_dos+nota_tres)/3; callback (resultado); }, 0); } promedio (3,4,10, function(resultado){ console.log(resultado); })
true
726a15d0b1c0cbd55bcb1eb030d35ebee562a225
JavaScript
PatriciaMaPe/javascript-course
/2_functions.js
UTF-8
397
3.859375
4
[]
no_license
var name = 'Patri' // global variable // Use the global variable 'name' function printUppercaseName() { name = name.toUpperCase() console.log(name) } // Use local variable 'n' function printUppercaseName(n) { n = n.toUpperCase() console.log(n) } // Use local variable 'name' function printUppercaseName(name) ...
true
ad511cf98c3a0b8611cec343fc997a2390ce8834
JavaScript
allfix53/scrapper
/respond/index.js
UTF-8
1,675
2.671875
3
[]
no_license
const db = require('./../db'); module.exports = { 'new': function (req, res, next) { db.data.create(req.body) .then(function (created) { return res.send(created); }) .catch(function (err) { return res.send(err); }) }, '...
true
41edee744171eba7805d608c78cf4921862cc3f3
JavaScript
saladinProcrastinator/webdriverio-from-scratch
/conf/error-handler.js
UTF-8
2,388
2.546875
3
[]
no_license
const DEFAULT_SEVERITY_LEVEL = 1; exports.config = { errorList: {}, getErrorSeverity: function(){ const id = browser.sessionId; let total = 0; if( ! id || ! this.errorList[id] ){ throw new Error('Invalid browser session, or error list has not been created yet.'); } for( let i = 0; i < this.errorList[id]...
true
0be395ebe23558a6b09dbad1dd1d28d1b9cb0b12
JavaScript
sslotsky/react-tag-box
/src/TagManager.js
UTF-8
1,415
2.609375
3
[ "MIT" ]
permissive
export default class TagManager { constructor(e, tagBox) { this.event = e this.tagBox = tagBox this.tagBoxData = { ...tagBox.props, ...tagBox.state } } execute(action) { this.event.preventDefault() action() } prev() { if (this.tagBoxData.considering) { this.execute(() => this.t...
true
74b1dc7b58f77ce7487077ba0aba8d39532d6018
JavaScript
zerofelx/zerofelx.github.io
/assets/js/Proyect.js
UTF-8
2,418
2.984375
3
[]
no_license
var ShowPandora = false var ShowBehimosu = false var ShowCyrozExchange = false function Show(id) { switch (id) { case "Pandora": if (ShowPandora) { Remove(id) ShowPandora = false break } else { Add(id) ...
true
13d884251ffd257b5ec9e39003bb71a9e4885bf4
JavaScript
lysychas/tweedle
/server/index.js
UTF-8
1,462
2.65625
3
[]
no_license
const express = require('express'); const cors = require('cors'); const monk = require('monk'); const Filter = require('bad-words'); const rateLimit = require('express-rate-limit'); const app = express(); const db = monk(process.env.MONGO_URI || 'localhost/tweedle'); // connect to mongodb const tweeds = db.get('tweed...
true
d4968be13542adf045b60dc14d40ba53c233930f
JavaScript
lixiaoxf/ieplaceholder
/js/ieplaceholder.js
GB18030
3,548
2.71875
3
[]
no_license
/* * jQuery placeholder, fix for IE6,7,8,9 * ʹIE֧inputplaceholder * * ִ $.ieplaceholder.init() * * 첽޸placeholder * * $.ieplaceholder.reFix() * */ (function(jQuery,window){ var iePlaceHolder = { // _check : function(){ return 'placeholder' in document.createElement('input'); ...
true
d1d530039938a613e9bf39726036ab52cae94f82
JavaScript
vaghawan/life-clock-for-new-tab-chrome-extension
/background.js
UTF-8
1,328
2.53125
3
[ "MIT" ]
permissive
var dob = ''; function background(){ chrome.storage.sync.get("data", function(items) { if (!chrome.runtime.error) { if(items !=null && items.data !=undefined && items.data !=null) { dob = items.data; // message for content scripts. chrome.tabs.onUpdated.addListener(functio...
true
670bf2c92221d8b3b927ab8b6faa965091ff31a2
JavaScript
datpo/cocaro
/client-main-game/src/components/Cell.js
UTF-8
3,648
2.71875
3
[]
no_license
import React, { Component } from 'react' // import aBoard from 'BoardData' import { connect} from 'react-redux' import io from 'socket.io-client'; class Cell extends Component { constructor(props) { super(props); this.state = { // status:true, // display:" ", //...
true
b17b484873e96b461e21012068e6d20e02ceaca2
JavaScript
Vidya1994/Mercato
/app/assets/javascripts/product.js
UTF-8
949
2.8125
3
[]
no_license
function addProductToCart(element) { var productId = element.id.split("-")[1]; console.log(productId); var payload = {}; var quantity = 1; payload['product_id']=productId; payload['quantity']=quantity; console.log(payload); $.ajax({ url: "...
true
c8a09535570068bc2d1d380f5b5007e889840cd7
JavaScript
Joaofreitas99/AudioBeamTree
/server/playlistFirebase.js
UTF-8
2,320
2.53125
3
[]
no_license
'use strict' const admin = require('firebase-admin'); const serviceAccount = require('./serviceAccount.json'); admin.initializeApp({ credential: admin.credential.cert(serviceAccount), databaseURL: "https://playlist-ffed8-default-rtdb.europe-west1.firebasedatabase.app/" }); // As an admin, the app has access to r...
true
37a1288cc48365544149a255f0fbeca735f72f97
JavaScript
bbuckner2092/array-problem-set
/arrayProblemSet.js
UTF-8
998
4.5
4
[]
no_license
// printReverse() - reverse the array // Create a function printReverse function printReverse(arr){ for (var i = arr.length - 1; i >= 0; i--){ console.log(arr[i]); } } printReverse([3,6,2,5]) // isUniform() - true if array is identical // Create a function isUniform() // that takes in the argument array function ...
true
4e199013065766f8a6b903cf0d08a9b8dcdb2b05
JavaScript
twoneks/cubes_intersection_detector
/src/lib/cube.js
UTF-8
400
3.0625
3
[ "MIT" ]
permissive
export class Cube { constructor(x, y, z, size){ size = parseInt(size); this.size = size; this.x = parseInt(x); this.y = parseInt(y); this.z = parseInt(z); this.min_x = this.x - (size/2); this.max_x = this.x + (size/2); this.min_y = this.y - (size/2); this.max_y = this.y + (size/2)...
true
4aca15c196c53ecc328cfae330219df3809ec31c
JavaScript
laurtann/js-practice
/data-strucs-and-algs/hashTable.js
UTF-8
1,233
3.9375
4
[]
no_license
class HashTable { constructor(size){ this.data = new Array(size); } _hash(key) { let hash = 0; for (let i =0; i < key.length; i++){ hash = (hash + key.charCodeAt(i) * i) % this.data.length } return hash; } set(key, value) { let address = this._hash(key); if (!this.data[a...
true
6bad181a647773df566d138450518fbee1a077f2
JavaScript
lmagarin/PortalDAW
/ejerciciosCliente/listado1/js/ejercicio11.js
UTF-8
997
3.828125
4
[]
no_license
/** * Implementa MediaPositivos que calcule la media de una serie de números positivos, * introducidos por teclado. Dejará de leer cuando el usuario introduzca el 0. * @author Rafa Miranda * @version 1.0 */ var arrayNumeros = []; function annadirNumero(){ var nuevoNumero = document.getElementById("numero").value...
true
b2c16b3a0c49efff66d389a788fba8635e352c11
JavaScript
kswensen/person-project-lite
/src/components/home/Home.js
UTF-8
3,937
2.53125
3
[]
no_license
import React, { Component } from 'react'; import './Home.css'; import Login from './../login/Login'; import axios from 'axios'; class Home extends Component{ constructor(){ super(); this.state = { logout: false, videos: [], toggled: false, url: '' ...
true
9b1c4c0c39f7107c9fa6f3862f07b3d832f414fd
JavaScript
chenky/study
/javascript/hd/json-replace-switch-case.js
UTF-8
719
2.828125
3
[]
no_license
// 祖传老代码 function getCityName(str) { let name = '' switch (str) { case 'china': name = 'china' break case 'hainan': name = '海南' break case 'xizang': name = '西藏' break case 'zhejiang': name = '浙江' break case 'yunnan': name = '云南' break ...
true
14b248291d2d3dfe5846040b2e5de49d4001751a
JavaScript
jatpeo/tutorials-vue
/17-Vuex的使用/01-vuex的基本使用/src/store/index.js
UTF-8
3,045
2.578125
3
[ "Apache-2.0" ]
permissive
import Vue from 'vue'; import Vuex from 'vuex'; import {INCREMENT} from './mutations-type' //导入mudations自定义变量 //1 安装插件 -》Vuex.instal Vue.use(Vuex); //2 创建对象 const store = new Vuex.Store({ state: { //一开始在此定义,则会将数据加入到响应式数据中,当属性发生变化,不同界面用到属性会通知自动刷新 counter: 100, students: [ {id: 1, name: 'aaa', age: 23...
true
bfa0fa71a4904cbe4b191da63e7d4c4f4eb396ce
JavaScript
Hamdalla2/Kiddo-1
/frontend/src/screens/subScreens/BodyPart.js
UTF-8
1,328
2.578125
3
[]
no_license
// frontend/src/screens/subScrees/BodyPart.js import React, { Component, useState } from "react"; import AppIntroSlider from "react-native-app-intro-slider"; import { Image, StyleSheet, Text, View } from "react-native"; // Initial info before the database const slides = [ { key: "Ears", image: { uri: "https://i.imgu...
true
f3988f77ed5303fa749d443316ba32d8de98b977
JavaScript
eugenesoo/challenges
/towersOfHanoi.js
UTF-8
485
3.140625
3
[]
no_license
class Tower { constructor(n) { this[1] = []; this[2] = []; this[3] = []; for (let i = n; i > 0; i -= 1) { this['1'].push(i); } } moveAllDisks(n, start, end, buffer = 6 - start - end) { if (n === 1) { const plate = this[start].pop(); this[end].push(plate); return; ...
true
2763878279d067124053d3b325f2e6ec6303fa48
JavaScript
ParadiseCode/WarPara
/client/js/updater.js
UTF-8
16,535
2.640625
3
[ "CC-BY-3.0" ]
permissive
define(['character', 'timer'], function(Character, Timer) { var Updater = Class.extend({ init: function(game) { this.game = game; this.playerAggroTimer = new Timer(1000); this.lastUpdate = new Date(); }, update: function() { this.deltaSecond...
true
147fbd4c5fe927bbe4ca127c5d98afad73f5b924
JavaScript
18127295886/YanXuan2.0
/yanxuan2.0/src/main/webapp/public/script/cart.js
UTF-8
7,954
2.640625
3
[ "MIT" ]
permissive
/** * @author: llk * @date: 2018/8/20 * @function: 购物车相关功能 */ /** * 购物车类 */ class Cart { constructor(id, price, number) { this.cartId = id; //商品id this.goodImg = ''; //商品图片 this.goodName = ''; //商品名字 this.goodSpec = ''; //商品规格 this.goodNumber = number; //商品数量 this.goodSinglePrice = parseFloat(...
true
48167d6f1419249e25065dc8eda0f412118b0e6b
JavaScript
riyadshauk/vanilla-es6-chess
/front_end/src/box.js
UTF-8
1,042
2.84375
3
[ "MIT" ]
permissive
/** * @typedef {!{pos: number, r: number, c: number, piece: (Piece|null), selected: boolean, possibleDest: boolean}} */ export var Box; /** * @function * @param {!number} pos * @returns {Box} */ export function emptyBox(pos) { return { pos: pos, r: Math.trunc(pos/8), c: pos%8, ...
true
06ce0cbd3124e9b4d78ae550bbb3356012e9e9f9
JavaScript
jaabiri/react-forms-lab-cb-gh-000
/components/PoemWriter.js
UTF-8
1,129
2.890625
3
[ "LicenseRef-scancode-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
const React = require('react'); class PoemWriter extends React.Component { constructor() { super(); this.state = { alue: "", valid: false }; } handleChange(e) { if(e.target.value){ var rouw = e.target.value.split(/\n/).filter(line=>line) let validline = rouw.l...
true
dd3472451c609d256f9ecd7adfdee938aec8cd59
JavaScript
aariasgonz21/Hogwarts
/src/Components/CharacterCard.js
UTF-8
1,590
2.578125
3
[]
no_license
import React from "react"; import House from "./House" class CharacterCard extends React.Component { state={ showForm: true, value: 'Gryffindor', house: this.props.character.house } showForm = e => { this.setState({ showForm: !this.state.showForm }) } handleChange = e => { t...
true
bd7d88077e699282495dc7090036dd818653d919
JavaScript
spcsenti/cloudplatformblog
/src/App.js
UTF-8
1,778
3.203125
3
[ "MIT" ]
permissive
import React, { useState } from 'react'; import './App.css'; function App() { let [글제목리스트, 글제목리스트변경] = useState(['첫번째 글', '두번째 글', '세번째 글1132']); let [날짜, 날짜변경] = useState(['1월 1일 작성', '1월 2일 작성', '1월 3일 작성']); let [좋아요, 좋아요변경] = useState(0); let [글제목, 글제목변경] = useState('첫번째 글'); function test() { ...
true
e75124fecccd4b64965bdc01a0da610ce6910521
JavaScript
clevertree/audio-source-composer
/common/storage/ClientStorage.js
UTF-8
6,519
2.53125
3
[]
no_license
import LocalStorage from "./LocalStorage"; import Values from "../../song/values/Values"; class ClientStorage { /** Loading **/ async getRecentSongList() { return this.decodeForStorage((await LocalStorage.getItem('song-recent-list')) || '[]'); } /** Encoding / Decoding **/ encodeForStor...
true
4df80554ac62224364f84d43206e7676468b960f
JavaScript
xszi/javascript-algorithms
/algorithm/c-stack/00-最小栈.js
UTF-8
523
3.1875
3
[]
no_license
class MinStack { constructor () { this.items = [] this.min = null } push (item) { if (!this.items.length) { this.min = item } else { this.min = Math.min(this.min, item) } this.items.push(item) } pop () { let temp = this...
true
42f45a135ca03b72209ba33d65ee1f35caef16b4
JavaScript
instinctwarrior/travel_app_fend
/src/server/server.js
UTF-8
2,209
3.125
3
[]
no_license
// Setup empty JS object to act as endpoint for all routes let projectData = {}; // Require Express to run server and routes const express = require("express"); // Start up an instance of app const app = express(); /* Middleware*/ const bodyParser = require("body-parser"); //Here we are configuring express to use bo...
true
3e6b51ed096427cc7e0b87246edc838f8cb849f5
JavaScript
JagdishWagh/React_Project
/src/components/calculator/calci.jsx
UTF-8
2,309
2.796875
3
[]
no_license
import React, { Component } from "react"; import CalcButton from "./calci-button"; import "./calci.css"; class Calculator extends Component { state = { calciButtons: [ { type: "numeric", value: 1 }, { type: "numeric", value: 2 }, { type: "nume...
true
e8e174376de2db685c1560d3bd47c9982bc98b23
JavaScript
bharathi6396/digitous-jquery
/exercice34/js/main.js
UTF-8
519
2.796875
3
[]
no_license
$("button").click(function() { let pays = $("input").val(); let url = "https://restcountries.eu/rest/v2/name/" + pays; console.log(url); $.ajax({ method: "GET", url: "https://restcountries.eu/rest/v2/name/" + pays, success: function(data, status, response) { ...
true
25a4d0a771c532d3e9cb26654540b4213d9e7cfe
JavaScript
pnevmat/goit-js-hw-07
/js/task-2.js
UTF-8
551
2.953125
3
[]
no_license
const ingredients = [ 'Картошка', 'Грибы', 'Чеснок', 'Помидоры', 'Зелень', 'Приправы', ]; const containerRef = document.querySelector('#ingredients'); containerRef.classList.add('ingredients'); function createElements(arr) { const markupArray = arr.map(ingredient => { const itemRef...
true
48113bfddf10bb52329a9bdaf46a6e67f76cd3f6
JavaScript
tddgit/Web-Technologies
/CLI/webcheck/index.js
UTF-8
2,112
2.828125
3
[]
no_license
#!/usr/bin/env node const fetch = require('node-fetch') const open = require('open') const arg = require('arg') const inquirer = require('inquirer') const chalk = require('chalk') const parseArgs = () => { const args = arg( { '--open': Boolean, '--yes': Boolean, '-o': '--open', '-y': '--...
true
902e03fd6f450064c6d98b4366d8b0c76f179c79
JavaScript
xmppjs/ltx
/test/is-test.js
UTF-8
1,205
2.625
3
[ "MIT" ]
permissive
import vows from "vows"; import assert from "assert"; import { isNode, isElement, isText } from "../src/is.js"; import Element from "../src/Element.js"; vows.describe("isNode").addBatch({ isNode: { "returns true for Element": () => { assert.strictEqual(isNode(new Element()), true); }, "returns true...
true
71ec191b340b918baea691a7f9be4b85005041b9
JavaScript
dazn311/statisticMggt
/server/server2.js
UTF-8
2,826
2.53125
3
[]
no_license
// const { static } = require('express') const express = require('express'); const bodyParser = require('body-parser'); const cors = require('cors') const app = express(); const port = 3003 const pgp = require("pg-promise")(/*options*/); const db = pgp("postgres://dazn311:postgress@localhost:5432/dazn311"); let users...
true
98a0672f9e2d3c21de0bc31e8ea8fe83dd9f6aa8
JavaScript
RERTJ/Finddy
/follow_git/public/js/custom.js
UTF-8
3,108
2.78125
3
[ "MIT" ]
permissive
/* Write here your custom javascript codes */ /*confirm password in registration page*/ jQuery(document).ready(function() { $('#register').click(function(){ var pass = $('#password').val(); var pass2 = $('#repassword').val(); if (pass == '') alert('Please ent...
true
6b810077151134f3e3b76bac9359ae335fd2f16e
JavaScript
deebnntt/fake-word-frontend
/src/WordShow.js
UTF-8
1,174
2.5625
3
[]
no_license
import React from 'react'; export default class WordShow extends React.Component { state = { word: { definitions: [] } }; componentDidMount() { const id = this.props.match.params.id; fetch(`http://localhost:3000/api/v1/words/${id}`) .then(res => res.json()) .then(json => { this.setState( { ...
true
435e44549be85db1a8e9c9bbd8e7fbd6a6d6f45c
JavaScript
googol/formatjs-site
/tests/functional/includes/html.event.polyfill.js
UTF-8
259
2.546875
3
[ "LicenseRef-scancode-unknown-license-reference", "BSD-3-Clause" ]
permissive
// Needed for PhantomJS < 2.0 if (!window.Event || typeof Event !== 'function') { Event = function (type, cfg) { var evt = document.createEvent('HTMLEvents'); evt.initEvent(type, cfg.bubbles, cfg.cancelable); return evt; }; }
true
ebef5890b140a585508b77fc93f12d660bab15b5
JavaScript
andrey-programmist/leetcode
/longest-common-prefix.js
UTF-8
540
3.546875
4
[]
no_license
const longestCommonPrefix = (strs) => { if (!strs.length) return ''; let prefix = strs[0]; for (let i = 1; i < strs.length; i++) { const len = Math.min(prefix.length, strs[i].length); for (let j = 0; j < len; j++) { if (strs[i][j] !== prefix[j]) { prefix = prefix.slice(0, j); break; ...
true
60fda4f71ab0e70d5880bffd97550ea3896383fa
JavaScript
garethslinn/custom_hooks
/src/App.js
UTF-8
879
2.59375
3
[]
no_license
import React, { useState } from 'react'; import { useStateStorage } from './hooks/useStateStorage'; import useToggle from './hooks/useToggle'; import { useDocTitle } from './hooks/useDocTitle'; import './App.css'; function App() { const [value, setValue] = useStateStorage('id'); const [inputValue, setInputValue] ...
true
57b246ac96cf67f1297eacc989e5522401c6d803
JavaScript
joelbeckum/capstone-in-the-bag
/src/components/discs/UserDiscProvider.js
UTF-8
1,633
2.546875
3
[]
no_license
import React, { createContext, useState } from "react" export const UserDiscContext = createContext() export const UserDiscProvider = (props) => { const [ userDiscs, setUserDiscs ] = useState() const getUserDiscs = () => { return fetch("http://localhost:8088/userDiscs?_expand=bag") .then(res ...
true
831b814a467fda2cacf9b54ae0ebd97db843da51
JavaScript
rahulshivsharan/NodeCodePractise
/basic02/folder01/myScript.js
UTF-8
128
2.609375
3
[]
no_license
var fn = function(msg){ var str = "The message entered was ["+msg+"]"; return { msg : str }; }; module.exports.myFn = fn;
true
5c859946b3a2dee69b5db3c14bda807eb5bd1fc6
JavaScript
spectralwind/brain-games-spectralwind
/src/games/parity.js
UTF-8
391
2.84375
3
[]
no_license
import make from '..'; import getRandomInt from '../utils'; const isEven = number => number % 2 === 0; const description = 'Answer "yes" if number even otherwise answer "no"'; const collectGameData = () => { const question = getRandomInt(0, 50); const answer = isEven(question) ? 'yes' : 'no'; return [question,...
true
935bd3d5a6b9306d7b8ddb2d738a20633e8301cb
JavaScript
nicogambolati/Curso-JS-Moderno
/22-Prototypes/js/03-app.js
UTF-8
845
3.734375
4
[]
no_license
function Cliente (nombre, saldo){ this.nombre = nombre; this.saldo = saldo; } //Este Metodo es Exclusivo de Cliente Cliente.prototype.tipoCliente = function() { let tipo; if(this.saldo > 10000){ tipo = 'Gold'; } else if (this.saldo > 5000){ tipo = 'Platinum'; } els...
true
de9219b025892413c9d13fb614a23b7d88f83fe7
JavaScript
yeungjj/M3-JavaScript-Exercise-2
/Part 2.js
UTF-8
1,205
3.828125
4
[]
no_license
/* Justin Yeung CWID: 50018281 JavaScript Exercise 2 Part 2: Write a JavaScript that outputs three tables. With each table output the annual balance after investing 1,000 with a fixed interest rate. Each entry of the table represents the balance after n years, where n runs from 1 to 5. The first entry for year 1, t...
true
4479741fc047e4b8452ff75677db3b5d861699af
JavaScript
avalladaresm/chatbot
/chatbotapp/src/Components/Channel/Channel.js
UTF-8
5,109
2.5625
3
[]
no_license
import React, { useState, useEffect } from 'react' import { MessageList } from 'react-chat-elements' import { Input, Button } from 'antd' import axios from 'axios'; export const Channel = (props) => { const { dataSource, addMessage, id, boards} = props; const [message, setMessage] = useState(); const [activeBoard,...
true
5414bfbfeaca6f19a19ddb0424c426e507e06740
JavaScript
qh931725663/websocket_vue
/src/socket/socket.js
UTF-8
1,998
2.765625
3
[]
no_license
import { protocol } from './protocol' let WS = 'ws://127.0.0.1:8000/websocket/' export class CWebSocket { constructor () { this.listenerList = {} this.waitingList = [] this.socket = new WebSocket(WS) this.socket.onopen = (...args) => { this.checkWaitingList(args) } this.socket.onmessage...
true
cf69ef1767702675f2452e2650e22ebca702d931
JavaScript
joel-rojas/algorithms
/codewars/7kyu/2dCellularNeightborhood.js
UTF-8
1,675
3.859375
4
[]
no_license
function get_neighbourhood(type, arr, coordinates) { if (arr.length === 0 || arr[0].length === 0 || (coordinates[0] < 0 || coordinates[1] < 0) || (!(arr[coordinates[0]] instanceof Array) || isNaN(arr[coordinates[0]][coordinates[1]]) || arr[coordinates[0]][coordinates[1]] < 0)) { return []; } ...
true
5a7b0ee5beae05eeb28315e777a6a2c507220143
JavaScript
BardoAlacran/Game_Project_1
/js/game.js
UTF-8
4,796
3.125
3
[]
no_license
class Game { constructor(options, callback){ this.ctx = options.ctx; this.player = options.player; this.rows = options.rows; this.columns = options.columns; this.map = options.map; this.enemy = []; this.gameover = false; this.callback = callback; }...
true
82dfbcf9a84170938f2e467751c05e6f4ca59d69
JavaScript
bioub/Formation_React_SensioLabs_2018_08
/todo-list/src/components/TodoForm.js
UTF-8
599
2.578125
3
[]
no_license
import React, { Component } from 'react'; class TodoForm extends Component { state = { newTodo: '', }; onSubmitHandler = (event) => { event.preventDefault(); this.props.onNewTodo(this.state.newTodo); this.setState({ newTodo: '', }); }; onChangeHandler = (event) => { this.setS...
true
9e810820f2fee0c7016840a045229d7b4112a521
JavaScript
djD-REK/React-TDD-Gift-Giver
/src/components/App.js
UTF-8
1,026
2.953125
3
[]
no_license
import React, { Component } from "react" /** * Class component version of App * (based exactly on course by David Joseph Katz) * * @class App * @extends {Component} */ class App extends Component { constructor(props) { super(props) this.state = { gifts: [] } } addGift = () => { const { gifts ...
true
599aa799b5979efcdeb944d5967e551837baba11
JavaScript
sydhsn/haptik-assignment
/src/App.js
UTF-8
3,090
2.5625
3
[]
no_license
import React from 'react'; import { Container, Segment, Button, Icon, List, Message, Pagination } from 'semantic-ui-react' import data from './data.json'; import HeaderComponent from './components/Header'; import AddFriend from './components/AddFriend'; import SearchFriend from './components/SearchFriend'; const style ...
true
1f96685dd07b0557a97074caec90fb49f8b63873
JavaScript
Avunit/minecraft-hub
/ext/js/application.js
UTF-8
2,864
2.65625
3
[]
no_license
$(function(){ App.init() }); function updateHeader(status){ $(document.body). removeClass('good'). removeClass('minorproblem'). removeClass('majorproblem'). addClass(status) } var App = { heading: { 'good': "Battle station fully operational", 'minorproblem': "Partial servi...
true
fba349e23723dbf95bce3092beac318022f1ce33
JavaScript
Shikaga/AwkChallenge
/public/js/ComparisonRow.js
UTF-8
452
2.625
3
[]
no_license
/** @jsx React.DOM */ ComparisonRow = React.createClass({ render: function() { var row = this.props.row || []; var tableCells = row.map(function (data) { var comparisonStyle = {}; if (!data.equal) { comparisonStyle.backgroundColor = "lightcoral" } else { comparisonStyle.backgroundColor = "lightgr...
true
0ec71b0d9ebe2d2f4e52f2d95f1ba0881e246c71
JavaScript
ParrotStone/JS-Problem-Solving
/Sequence Equation/main.js
UTF-8
436
3.609375
4
[ "MIT" ]
permissive
#!/usr/bin/env node // Problem Description at -> https://www.hackerrank.com/challenges/permutation-equation/problem function permutationEquation(p) { const output = []; for (let i = 1; i <= p.length; i++) { const p_x = p.indexOf(i) + 1; output.push(p.indexOf(p_x) + 1); } return output; } console.log...
true
ea2f028fd3287067d8417dba3678a462256ad507
JavaScript
tmckenzie/saleschart
/app/assets/javascripts/plugins/clear_inputs.js
UTF-8
748
2.90625
3
[ "MIT" ]
permissive
(function ($) { $.fn.clearInputs = function () { var $inputs = $(this); $inputs.focus(function () { if (this.defaultValue === this.value) { this.value = ""; } $(this).blur(function () { if (this.value === "") { this.value = this.defaultValue; } }); ...
true
23faeefe06e6651cf96020be6defb06f42f4c257
JavaScript
MichWhite/simple-react-project
/src/components/formcreate.js
UTF-8
3,332
2.703125
3
[]
no_license
/** * Created by michealin on 3/13/2017. */ import React, {Component} from 'react'; import _ from 'lodash'; import './formcreate.css'; class FormCreate extends Component { constructor(props) { super(props); this.toggle = this.toggle.bind(this); this.state = { d...
true
efd2869357e7e68e5af1ecdb9123cd6019557064
JavaScript
schipiga/glacejs-demo
/for-glace-core/basic-examples/tests.js
UTF-8
987
2.59375
3
[]
no_license
"use strict"; test("passed test", () => { chunk(() => {}); }); test("failed test", () => { chunk(() => { throw Error("BOOM!"); }); }); test("skipped test", { skip: "Due to bug https://my.bugtracker.org/126" }, () => { chunk(() => {}); }); test("with failed chunk", () => { chunk("...
true
ec023c80dd9b9080383553578e5be31503f23bac
JavaScript
IvVelichkova/JS_SoftUni
/LabAndExercise/TimeConverter/timeConverter.js
UTF-8
1,549
3.296875
3
[]
no_license
function attachEventsListeners( ) { let daysBtn=document.getElementById('daysBtn'); let hoursBtn=document.getElementById('hoursBtn'); let minutesBtn=document.getElementById('minutesBtn'); let secondsBtn=document.getElementById('secondsBtn'); daysBtn.addEventListener('click', function ( ) { document.getElementBy...
true
942f25bc099754f86b49c0cdbd9bae1a11e714b8
JavaScript
wpbeirut/modern-javascript
/section3-dom/8-className-classList/app.js
UTF-8
623
3.75
4
[]
no_license
// className // classList const first = document.getElementById('first'); const second = document.getElementById('second'); const third = document.getElementById('third'); // const classValue = first.className; // console.log(classValue); second.className = 'colors text'; // third.classList.add('colors'); // third....
true
cdc77eacf07f360c71d51c2e7d40cbfaf944f54c
JavaScript
lavfrim/core-js-interview
/core-js-cheatsheet/promise.js
UTF-8
6,815
4.1875
4
[]
no_license
// Promise - это прием работы с отложенным и/или асинхронным кодом // который связывает "создающий" код с "потребляющим" // Создан для того чтобы решить проблему callback hell // Promise принимает в себя функцию // код которой выполняется в общем потоке // до того как конструктор промиса вернет созданный объект ??? на...
true
3c30cebce416b0b4e5e5ebb03ac2d46f62a8d67c
JavaScript
vsaxena33/DXC
/Day3/JavaScript/actionform.js
UTF-8
984
3.0625
3
[]
no_license
function actionform() { username = document.getElementById("userName").value; password = document.getElementById("password").value; var div1 = document.getElementById("div1"); var div2 = document.getElementById("div2"); if(username == 0) { div1.innerHTML = "<font color = red>user...
true
515f155754ad64e12775ceca37c78709cd7f2116
JavaScript
becca-bailey/tttaas-js
/src/games/ComputerVsComputerGame.js
UTF-8
1,697
2.859375
3
[ "MIT" ]
permissive
var ComputerVsComputerGame = function(httpClient, ui, gameState) { this.httpClient = httpClient; this.ui = ui; this.gameState = gameState; } ComputerVsComputerGame.prototype.play = function() { this.ui.disableSpots(this.gameState.board); this.ui.displayTurn(this.gameState.getPlayerMarker()); this.ui.disabl...
true
52468652a13548f3e57bd669221197f017259be6
JavaScript
Sumancheema25/variable
/agram.js
UTF-8
813
3.734375
4
[]
no_license
function String(str) { var arr=new Array(); var j=0; var Lowerchange=str.toLowerCase(); for(let i of Lowerchange) { arr[j]=i; j++; } var local; for(var i = 0; i < arr.length; i++) { for(var j = i + 1; j < arr.length; j++) { if(arr[i] > arr[j]){ local = arr...
true
58fb31f6c6f9f3827d23a5e35a9f0afd1dcae2e1
JavaScript
Tirondzo/GGJ2019
/js/game.js
UTF-8
28,179
2.53125
3
[]
no_license
(function (Phaser) { var SCALE = 3; var WIDTH = 240; var HEIGHT = 192; var HOME_DISTANCE = 1000; var ENOUGH_FOOD = 8; var game = new Phaser.Game( WIDTH*SCALE, HEIGHT*SCALE, Phaser.AUTO, // The type of graphic rendering to use // (AUTO tells Phaser to det...
true
1e181650464956fdb2092e97844bec8f7de74874
JavaScript
LineageOS/cve_tracker
/static/js/utils.js
UTF-8
2,738
2.78125
3
[]
no_license
(function(){ function createElement(type, o) { var e = document.createElement(type); if (o.parent) { o.parent.appendChild(e); delete o.parent; } if (o.content) { e.innerHTML = o.content; delete o.content; } if (o.styl...
true
fcb87b6a9345024d6016898b0fa38579a224e7bc
JavaScript
Afilidia/AfilidiaTimathon-Exploration
/public/js/search_engine/search.js
UTF-8
5,930
3.078125
3
[]
no_license
// -*- coding: utf-8 -*- "use strict"; /** * Search Engine class file. * * @description Searches for a datasets. * * @link /public/js/search_engine/search.js * @file This file defines the Search class that * searches for a products that matches a given keyword. * * @author Adriskk * @since 0.0.1 * ...
true
7f4771685ed60a7c22345214976ad3ff1a378815
JavaScript
vinecunha/Desafio2-HiringCoders_GestaoDeCadastros
/js/produtos.js
UTF-8
1,415
3.140625
3
[]
no_license
const formulario = document.querySelector("#prod_form") formulario.addEventListener("submit", (e) => { e.preventDefault(); let id = document.querySelector("#id-prod").value let prod = document.querySelector("#nome-prod").value let descr = document.querySelector("#descr-prod").value let marca = document.que...
true
7c6a55b5e1b243e78ef1963a961aa4877d7cb74a
JavaScript
Isidore-Newman-School/Beau-VanDenburgh-19
/Projects/00 - old & abandoned projects/01 - photoshop/sketch.js
UTF-8
1,911
3.234375
3
[]
no_license
function setup() { createCanvas(600,600); } var strokes = []; var writeToStroke = 0; var mouseIsBeingDragged = false; var strokeMode = 0; var newStrokeX = 0; var newStrokeY = 0; var strokeInProgress = false; function draw() { background(128); if(strokeInProgress){ renderStrokePreview(); frameRate(30); ...
true
e3f7db13ed6687c8ae49b116aeeea228a6d4846b
JavaScript
kevin-mr/iot-server
/server.js
UTF-8
1,694
3.125
3
[]
no_license
//Lista de frecuencias de envio en espera a ser enviadas var arduinos = []; var express = require('express'); var app = express(); var bodyParser = require('body-parser'); var io = require('socket.io-client')('http://dashboardiotkvvn.azurewebsites.net/'); app.use(express.static('public')); app.use(bodyParser.json());...
true
6c2261f8f3cab54624996bece0f7a76f21031365
JavaScript
cambpaz/planet-app
/js/main.js
UTF-8
4,634
2.890625
3
[]
no_license
$(document).ready( $.get("json/data.json", function (listaPlanetas, estado) { let planetas = []; if (estado == "success") { for (planeta of listaPlanetas) { planetas.push(planeta) } } LocalStorage.guardarPlanetas(planetas); }), ) let color...
true
fc3c7d909defa293cedfd0fb689d8caf3b9a792d
JavaScript
enterpaper/homework
/practice/Data Structures and Algorithms with JavaScript/054-arrayMap02.js
UTF-8
200
2.875
3
[]
no_license
/** * Created by Adminstrator on 2017/7/19. */ function first(word) { return word[0]; } var words = ["for", "your", "information"]; var acronym = words.map(first); console.log(acronym.join(""));
true
3dc53cac0742a5074b45dad61590c5496e27523d
JavaScript
NicolePell/toDoJavascript
/public/scripts/app.js
UTF-8
1,083
2.765625
3
[]
no_license
function Task(data) { this.description = ko.observable(data.description); this.complete = ko.observable(data.complete); this.created_at = ko.observable(data.created_at); this.updated_at = ko.observable(data.updated_at); this.id = ko.observable(data.id); } function TaskViewModel() { var t = this; t.tasks ...
true
61497a166a2111c7ce125586b5b285baca5c63b8
JavaScript
xerq/machan-server
/controllers/userController.js
UTF-8
2,129
2.578125
3
[]
no_license
import User from "../models/userModel.js"; import Session from "../models/sessionModel.js"; import SessionController from "./sessionController.js"; const controller = {}; controller.addAccount = (ip, name, password) => { return new Promise((resolve, reject) => { var user = new User({ ipMaker: ...
true
cc48d527acd95edc6c5fee3758619edf249b2d58
JavaScript
workrahul22/redis-cache
/server.js
UTF-8
1,223
2.53125
3
[ "MIT" ]
permissive
const express = require("express"); const responseTime = require("response-time"); const axios = require("axios"); const redis = require("redis"); const app = express(); const client = redis.createClient(); client.on('error',(err) => { console.log('Error '+err); }); app.use(responseTime()); app.get("/api/searc...
true
a690fe08bfff4f37bde604aed630391d49118dd9
JavaScript
babor99/Ajax1
/app1/static/index.js
UTF-8
3,789
3.109375
3
[]
no_license
window.onload = initAll; var saveBookButton; var showBook; function initAll() { saveBookButton = document.getElementById('save_book'); saveBookButton.addEventListener('click', saveBook); showBook = document.getElementById('showBook'); showBook.addEventListener('click', showAllBooks); } function showAl...
true
dd3bdb92ed66655053287d87135082a5ed20cade
JavaScript
raphamatador/etiqueta
/dragndrop.js
UTF-8
826
2.546875
3
[ "MIT" ]
permissive
function allowDrop(ev) { ev.preventDefault(); } function drag(ev) { ev.dataTransfer.setData("text", ev.target.id); } function drop(ev) { ev.preventDefault(); if (!ev.target.getAttribute("ondrop")) return false; var data = ev.dataTransfer.getData("text"); ev.target.appendChild(document.getElementById(data)); }...
true
62109dcd89d9caf231184b400b43f7346e10c629
JavaScript
paulinomreyes/GCPFunctions
/index.js
UTF-8
864
3
3
[]
no_license
/** * Triggered from a message on a Cloud Storage bucket. * * @param {!Object} event The Cloud Functions event. * @param {!Function} The callback function. */ const vision = require('@google-cloud/vision')(); const storage = require('@google-cloud/storage')(); exports.processFile = function(event, callback) { ...
true
769f778faa37acf08a300a584495dd325fe34e8c
JavaScript
Linus2228/other
/RSS/doubly-linked-list-master/src/linked-list.js
UTF-8
2,745
3.21875
3
[]
no_license
const Node = require('./node'); class LinkedList { constructor() { this._head = null; this._tail = null; this.length = 0; } append(data) { var node = new Node(data); if (this.length) { this._tail.next = node; node.prev = this._tail; th...
true
2e75c318791f2715df17412072ebdf50629098db
JavaScript
mzemlo/PersonalWebsite
/PersonalWebsite/ClientApp/src/sections/home/HeroShot.js
UTF-8
2,051
2.65625
3
[]
no_license
import React, { Component } from 'react'; //import './HeroShot.scss'; import SectionSubHeading from '../../elements/SectionSubHeading'; class HeroShot extends Component { constructor(props){ super(props); this.state = { heading: ``, i: 0 } } componentDidMount() { const intervalId = s...
true
ff5cca2dfcdb0e036574488392e493ca7c78df60
JavaScript
Avinashreddyui/AJAX-calls-express-jquery-API
/scripts/post.js
UTF-8
626
2.515625
3
[ "MIT" ]
permissive
/** * Created by Avinash Theppala on 4/16/2017. */ $(function() { $('#btn').click(function (e) { e.preventDefault(); console.log('select_link clicked'); var data = { name: $("#name").val(), age: $("#age").val() }; $.ajax({ t...
true
0017ee30f7b8d01a438c13a2a257d82a75326215
JavaScript
ZhaoShuyin/JavaWeb
/web-front/web/js/xmlHttp.js
UTF-8
826
2.8125
3
[]
no_license
//获取Ajax的核心对象 XMLHttpRequest /* function getXMLHttpRequest() { var xhr; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xhr = new XMLHttpRequest(); } else {// code for IE6, IE5 xhr = new ActiveXObject("Microsoft.XMLHTTP"); } return xhr; } */ function getXMLHttpRequest() { var ...
true
5e62b4818bd75204ee5d330e5ff448e6025fbd45
JavaScript
NhlanhlaHasane/node-ecommerce
/public/js/admin/adminPreguntasFrecuentes.js
UTF-8
1,084
2.765625
3
[]
no_license
let acordeonPreguntasFrecuentes; window.addEventListener('load', () => { acordeonPreguntasFrecuentes = new Acordeon('Preguntas frecuentes', '#preguntas-actuales', true); }); //Envia la nueva pregunta al servidor function enviarNuevaPregunta(){ let nuevaPregunta = { 'pregunta': q('[name=pregunta]').value, 'respue...
true
a47bd1713e5423c4dc756ef51d800b5661d8d100
JavaScript
exponentsoftware/fdoc_1-V-535
/1c.js
UTF-8
385
3.453125
3
[]
no_license
const sentence = `I am a teacher and I love teaching. There is nothing as more rewarding as educating and empowering people. I found teaching more interesting than any other jobs. Does this motivate you to be a teacher?`; function countWords(para){ let paraSplit=para.split(" "); return paraSplit.filter(...
true
ba26054f3329682ff612682d5f582f96070f2cf8
JavaScript
aml2732/treeDesigner
/index.js
UTF-8
2,424
2.984375
3
[]
no_license
//Canvas draw functions -------------------------------------------------------- function drawTree_Base(){ if(treeType == 'cct'){ base_cct(); } if(treeType== 'ht'){ base_ht(); } } function drawTree(){ ctx.clearRect(0, 0, c.width, c.height); drawTree_Base(); tree_options.forEach(function(parentItem){ pa...
true
312b5796b0b29a449fe40c06d89a589b4fb406e9
JavaScript
hwp201314/robot
/index.js
UTF-8
1,137
2.75
3
[]
no_license
var sendText = document.getElementById("send-text"); sendText.onkeyup = function (e) { // console.log(e.keyCode) if (e.keyCode === 13) { renderDom("mine", this.value); ajax({ url: 'https://developer.duyiedu.com/edu/turing/chat', // url: 'http://localhost:3000/chat', ...
true