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
16b75b33c92a283d4f088b43ecc562d694ed68b2
JavaScript
wngn123/resources
/src/project/app/static/js/common/wngn.js
UTF-8
11,695
2.5625
3
[]
no_license
function Wngn() { } var wngn = new Wngn(); Wngn.prototype.conf_navbar = function (url, name, active) { var navbar = {}; navbar.url = url; navbar.name = name; navbar.active = active; return navbar; } Wngn.prototype.conf = function (title, navbars) { var container = {}; container.title = t...
true
9433e1c63c27d28a2cb3f7f273027cf706172b41
JavaScript
whatjackhasmade/NOFACE-GATSBY-2018
/src/components/helpers.js
UTF-8
1,172
2.984375
3
[ "MIT" ]
permissive
export function autoParagraph(html) { html = "<p>" + html.split(/\n/).join("</p>\n<p>") + "</p>"; return html; } export function decodeHTML(html) { html = html.replace("amp;", ""); return html.replace(/&#(\d+);/g, function(match, dec) { return String.fromCharCode(dec); }); } export function flattenSlug(slug) {...
true
c25f15337ff7a0cff103d4c4ffae442ac37e6425
JavaScript
oktupol/redi-js-code-examples-2020-10-06
/03-json.js
UTF-8
166
3.015625
3
[]
no_license
/** * JSON = javascript object notation */ let someJsonString = "{\"name\":\"Sebastian\",\"hobby\":\"programming\"}"; console.log(JSON.parse(someJsonString));
true
39641b38280b4b8a8b2c19101ed0f5000f06e297
JavaScript
mindreframer/reactjs-stuff
/github.com/Khan/perseus/src/widgets/dropdown.jsx
UTF-8
5,673
2.59375
3
[ "MIT" ]
permissive
/** @jsx React.DOM */ (function(Perseus) { require("../core.js"); var InfoTip = require("../components/info-tip.jsx"); var Widgets = require("../widgets.js"); var Dropdown = React.createClass({ getDefaultProps: function() { return { choices: [{}], selected: 0 }; }, ...
true
21aea9d131eaa0c20dfeb00668a2c7ad0c84ed1a
JavaScript
riturajborpujari/electron-react-boilerplate
/src/electron-starter.js
UTF-8
3,855
2.703125
3
[ "MIT" ]
permissive
const electron = require('electron'); const sqlite = require('sqlite3'); // Module to control application life. const app = electron.app; // Module to create native browser window. const BrowserWindow = electron.BrowserWindow; const {ipcMain} = electron; const path = require('path'); const url = require('url'); // ...
true
9ef53346594efd33c23e42269be6e49a8837b587
JavaScript
Vabishchevich/CodeWars
/6 kyu/Is_a_number_prime?.js
UTF-8
838
4.53125
5
[]
no_license
/* Is Prime Define a function isPrime/is_prime() that takes one integer argument and returns true/True or false/False depending on if the integer is a prime. Per Wikipedia, a prime number (or a prime) is a natural number greater than 1 that has no positive divisors other than 1 and itself. Example isPrime(5) => true As...
true
17051db278425c63d6d085192e80f34f6051b98e
JavaScript
Sikarnas/Weather-API
/utils/weather.js
UTF-8
1,845
2.84375
3
[]
no_license
const request = require("request"); const moment = require("moment"); const weather = (information, callback) => { const url = `https://api.darksky.net/forecast/e25d57575612bddbdad82ee34398d0c3/${ information.lat },${information.long}?units=si`; request({ url, json: true }, (error, response) => { const w...
true
45a6cee7c25c3a5dcadd620ca8005596d3deb19a
JavaScript
openintegrationhub/Shopify-Component
/test/transformations.test.js
UTF-8
3,027
2.578125
3
[ "Apache-2.0" ]
permissive
const { expect } = require('chai'); const { personToOih } = require('../lib/transformations/personToOih'); const { personFromOih } = require('../lib/transformations/personFromOih'); const { oihPerson, shopifyCustomer } = require('./seed/transformations.seed'); describe('Transformations', () => { before(async () =>...
true
ad1175c7c76ba69d76a8720b547b7f087ea6a8db
JavaScript
serhiikondratiuk/goit-js-hw-07
/js/task-07.js
UTF-8
243
2.796875
3
[]
no_license
const refs = { fontSizerEl: document.querySelector('#font-size-control'), textEl: document.querySelector('#text'), }; refs.fontSizerEl.addEventListener('input', event => { refs.textEl.style.fontSize = `${event.currentTarget.value}px`; });
true
51de103ed1c3f6f7ff1bf6c59cdc56b4c73d5332
JavaScript
alm9/series-app
/src/context/AppContext.js
UTF-8
803
3.015625
3
[]
no_license
/* Ninguém mexe no estado global diretamente, * mas por ações especiais passadas aqui */ import { createContext } from 'react'; export const AppContext = createContext(); /* state = estado anterior * action = ação a ser executada * .type = tipo da ação * .payload = valor dos nossos itens */ export co...
true
20021c8e8415a2d5ccff82dc7538e51a79444519
JavaScript
tzahig/RSI-Assist
/js/background.js
UTF-8
9,397
3.21875
3
[ "MIT" ]
permissive
// Initialize a trie object that contains the word dictionary var trie = new Trie(); trie.loadDictionaryFile('/includes/dictionary.txt'); // User preferences, default stored here (for now) var DISABLED = false; var MIN_CHARS_WORD = 2; var INSERT_SPACE = true; var MAX_SUGGESTIONS = 5; /** * Add a listener to listen ...
true
ca857b3c1c74ffdfac25b1646d6b5d0ecf84e47f
JavaScript
Djcoper/Djcoper.github.io
/tenprint/tenprint.js
UTF-8
495
3.265625
3
[]
no_license
function setup () { createCanvas(window.innerWidth,window.innerHeight); stroke(255); strokeWeight(10); background(74, 154, 239); } const area = 30; let x = 0; let y = 0; const time = 60; function draw () { if (frameCount % time === 0) { background(74, 154, 239); y = 0; } while (y < height) { ...
true
c65158b819efb2e1f40829986e02d474d93e0cdc
JavaScript
LN2410/greeting-exercise-express
/index.js
UTF-8
3,202
2.515625
3
[]
no_license
let express = require('express'); let Greetings = require('./greetings'); const exphbs = require('express-handlebars'); const bodyParser = require('body-parser'); const app = express(); const flash = require('express-flash'); const session = require('express-session'); app.use(session({ secret: "add a secret st...
true
c02454ffd5b49fb3f213042063beaaff86419f1e
JavaScript
PimTournaye/GPT3
/frontend/script.js
UTF-8
4,102
3.15625
3
[]
no_license
//console.log(localStorage.length); const url = "http://localhost:3000" /*const data = { test: "test" } const promptPrestatyn = "Tell me a curious story about the coast of Prestatyn. Something to keep me entertained while I continue my bike ride." const promptLlandudno = "We've arrived at Llandudno! What can you ...
true
78773b18bdab2036beff92c800536757c41adc27
JavaScript
utfpr-gp/web-ii
/2020-1/2020-09-08--pessoa-rica-pobre/2020-09-08--rica.js
UTF-8
214
2.78125
3
[]
no_license
class Rica extends Pessoa { constructor(nome, idade, dinheiro) { super(nome, idade); this.dinheiro = dinheiro; } fazCompras() { console.log(`${this.nome} faz compras!`); } }
true
5f32769973820611ea1afef66b9d50bc536aa423
JavaScript
knirt/forkify-recipe-app
/src/js/views/searchresults-view.js
UTF-8
1,292
2.578125
3
[]
no_license
import View from './view.js'; // import icons from 'url:../../img/icons.svg'; class SearchResultsView extends View { constructor() { super(); this._searchBtn = document.querySelector('.search__btn'); this._parentElement = document.querySelector('.results'); this._errorMessage = 'Sorry, we could...
true
024771982a9cd23bba63bb00f6711c9f12e36be6
JavaScript
v4vishalrajput/cheerio
/git.js
UTF-8
2,240
2.546875
3
[]
no_license
const request=require("request"); const cheerio=require("cheerio"); const fs=require("fs"); let finalData=[]; let totalTopics=0; request("https://github.com/topics",callback) function callback(err,res,html){ if(!err){ fs.writeFileSync("q1.html",html); let $=cheerio.load(html); let topic=...
true
b63ce976ca3c3d353a828667e8ba8215f225e735
JavaScript
rahulhsreedhar/todo-app-WebComponents
/components/todo-main/src/TodoMain.js
UTF-8
2,042
2.78125
3
[ "MIT" ]
permissive
import { html, LitElement, css } from 'lit-element'; import { repeat } from 'lit-html/directives/repeat'; import '../../todo-item/todo-item.js'; import '@lion/input/lion-input.js'; import '@lion/button/lion-button.js'; export class TodoMain extends LitElement { constructor() { super(); this.todos = []; }...
true
413e7d0a91f349908e0048adae92c9e1093bab74
JavaScript
AndrianusTinas95/contact-app-express
/utils/contact.js
UTF-8
1,782
3.078125
3
[]
no_license
const fs = require('fs'); const dirPath = './data'; if (!fs.existsSync(dirPath)) { fs.mkdirSync(dirPath); } const dataPath = './data/contacts.json'; if (!fs.existsSync(dataPath)) { fs.writeFileSync(dataPath, '[]', 'utf-8'); } // ambil semua data di contact.json const loadContacts = () => { const fileBuffe...
true
ca0d96767b15f6bdf8dde01c40599b15487157a2
JavaScript
hattan/VenuePop
/VenuePop/scripts/hello-world.js
UTF-8
959
2.671875
3
[]
no_license
var messages = []; $(function () { $("#message").hide(); function PollData() { $.ajax({ url: "http://localhost:4477/api/message", type: "get", success: function (data) { $.each(data, fu...
true
51360689cd2507fab1346680219c246ec4a653ba
JavaScript
tejeskhandagale400/Javascript_Assignments
/Bank_Account/BankAccountByclassMethod.js
UTF-8
3,539
3.34375
3
[]
no_license
class Bankaccount { constructor(accountNumber,accountHolderName,accountBalance) { this.accountNumber=accountNumber; this.accountHolderName=accountHolderName; this.accountBalance=accountBalance; } deposite(a...
true
10087b11571890b339fbd178d0345728fbca02f9
JavaScript
takumifukasawa/testbed-webgl-sketches
/docs/simple-noise/src/js/script.js
UTF-8
1,666
2.59375
3
[]
no_license
import createTHREE from "./lib/createTHREE"; import createBorderTexture from "./lib/createBorderTexture"; import loadTexture from "./lib/loadTexture"; const glslify = require("glslify"); const vertexShader = glslify.file("./../glsl/THREEBasic.vert"); const fragmentShader = glslify.file("./../glsl/output.frag"); cons...
true
50f88e92856019605c23013aace18446837b564b
JavaScript
JuanvictorO/workshop-calendar
/public/js/cadastrar.js
UTF-8
3,323
2.96875
3
[]
no_license
// Adiciona um valor no campo DATETIME ao enviar o formulário. $('#form-event').submit(function () { var date = $('#cadastrar #start').val(); var time = $('#time').val(); var datetime = date + ' ' + time; $('#datetime').val(datetime); }); // FULL CALENDAR document.addEventListener('DOMContentLoaded', f...
true
3fe228bb1040c77f56be9792f19864e9c78a9f47
JavaScript
taxilng/angularGulp
/src/app/components/common/services/common.service.js
UTF-8
1,266
2.640625
3
[]
no_license
'use strict'; module.exports = function commonService() { var service = { clearSelectText: clearSelectText, setSelectTextById: setSelectTextById }; return service; /** * 清除下拉框 * @param {[String]} clearText [] * @return {[type]} [description] */ functi...
true
6b36fb6aaa79dd09e7797ba6d791e19eb0e25dbf
JavaScript
Codo-a-Codo-4-0-Comision-2167/Codo-a-Codo-4-0-Comision-2167.github.io
/js/player.js
UTF-8
923
3.34375
3
[ "MIT" ]
permissive
/** * El Objeto player deberia tener las siguientes propiedades: * - Que tema musical/musica esta reproduciendo * - Deberia el estado del musica (play, pause, etc) * - deberia saber el volumen * - Deberia saber cuanto dura el tema musical/musica * * El objeto, debe permitir interactuar con el de la siguiente: ...
true
abb031582131e093c08969cef5a0b5daa2e4d848
JavaScript
DumindaWijesinghe/lease_browser
/src/actions/leaseActions.js
UTF-8
1,478
2.578125
3
[]
no_license
import { LEASES_REQUESTED, LEASES_COMPLETED, LEASES_FAILED, LEASE_DETAILS_REQUESTED, LEASE_DETAILS_COMPLETED, LEASE_DETAILS_FAILED, } from './actionTypes' import axios from 'axios'; export const fetchLeases = () => { return dispatch => { dispatch(fetchLeasesRequested()) ax...
true
87bcb50fc3c7666865dcbb70156f2c4b968ceb0f
JavaScript
lovely-libras/redux-genie
/generator_code_files/rails_style/update/update_combine_reducer.js
UTF-8
1,321
2.734375
3
[ "MIT" ]
permissive
// for the Rails model const fs = require("fs"); const chalk = require('chalk') module.exports = async (modelNames, structure) => { let fileLocation = structure === 'Rails' ? `${process.cwd()}/store/reducers/combine_reducers.js` : `${process.cwd()}/store/combine_reducers.js` ; fs.readFile(fileLocation, (err, data...
true
e85738f2e6b3c8ba6c7e53bb17c1e7bfa6ff2cdd
JavaScript
Valcroca/react_personal_budget
/app/assets/javascripts/components/Budgets.js.jsx
UTF-8
1,272
2.953125
3
[]
no_license
class Budgets extends React.Component{ constructor(props){ super(props); this.state = {budgets: []}; this.submitBudget = this.submitBudget.bind(this); } componentDidMount(){ $.ajax({ url: '/budgets', type: 'GET', }).success( data => { this.setState({budgets: data.budgets}); ...
true
56c10dd4d09d89e3c2596060e141e5e3314f3dee
JavaScript
mascarenhaswanja/BCDV1008
/lab_test/systeminfo.js
UTF-8
383
2.59375
3
[]
no_license
const os = require('os'); /* CPU architecture, hostname, operating system type */ exports.systemInfo = () => { console.log(`Operating System Info: CPU architecture: ${os.arch()} name: ${os.hostname()} name: ${os.type()}`); } /* username, home directory */ exports.userInfo = () => { console.log(`User Info: User na...
true
80447b9673cf7a69d18753e20240b4dc041dd075
JavaScript
anjana-vairav/eui
/lib/services/color/is_valid_hex.js
UTF-8
199
2.53125
3
[ "Apache-2.0" ]
permissive
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isValidHex = isValidHex; function isValidHex(hex) { return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(hex); }
true
19ed6627586cbb52ea4113b6e26a36749c280f39
JavaScript
janstoff/Super-Simple-Inventory
/routes/authRoutes.js
UTF-8
638
2.53125
3
[]
no_license
// Route Handlers const passport = require('passport') module.exports = app => { app.get( //1. argument is the path //2. argument is code to be executed when the request comes in '/auth/google', passport.authenticate('google', { scope: ['profile', 'email'] }) ) app.get( //this time the auth via pass...
true
c68ecf29dace5a53dbb913fbe8eb06615c2062bc
JavaScript
JasonAMartin/wireless-security-client
/src/components/SignalRating.js
UTF-8
1,048
2.640625
3
[]
no_license
import React, { PropTypes } from 'react' import Styles from './styles/SignalRating.css'; const determineRating = (signal, signalRating) => { const signalInt = Number(signal) console.log('sig ', signalInt, signalRating, signalInt >= signalRating); return (signalInt >= signalRating) ? 'fa-star ' + Styles.filledsta...
true
84b580c86f990ce7c71caf25974198509c33b4cd
JavaScript
dezfowler/dezfowler.github.com
/demos/csspp-js/csspp.js
UTF-8
1,035
2.890625
3
[]
no_license
var reVars = new RegExp().compile('\\$(\\w+)\\$', 'g'); var reNests = new RegExp().compile('(([^;\\}]+)\\s*\\{[^\\}]+)\\s(([^;\\}]+)\\s*\\{[^\\{\\}]+\\})', 'g'); WhenDomReady(function(){ var h = document.getElementsByTagName('head')[0]; var scps = document.getElementsByTagName('script'); for(var i = 0; i < scps...
true
2cae3e911e8b840b3f463a234a6a226ef38b890b
JavaScript
Smoure/starwars-single-page
/src/js/component/home.js
UTF-8
2,288
2.859375
3
[]
no_license
import React, { useState, useEffect } from "react"; import { Card } from "./card"; import { Jumbotron } from "./jumbotron"; //create your first component export function Home() { const [species, setSpecies] = useState([]); useEffect(() => { fetch("https://swapi.co/api/species/") .then(resp => resp.json()) ....
true
f1449c0d270747d4e9288c6993634007f46d67b2
JavaScript
VolkerQuillfeldt/homepage-frontend
/src/components/SideNav.js
UTF-8
976
2.671875
3
[]
no_license
import React, { Component } from 'react'; import Continent from './Continent'; class SideNav extends Component { constructor() { super(); this.state = { myContinents: [] } this.changeBody = this.changeBody.bind(this); }; changeBody(path, page, count) { this.props.changeBody(path, page, count); }...
true
82e4ac6b8bdac4c3c447d519288e13cc3ac30c27
JavaScript
sketchfab/sculptgl
/object/shader.js
UTF-8
3,674
2.78125
3
[ "MIT" ]
permissive
'use strict'; function Shader(gl) { this.gl_ = gl; //webgl context this.type_ = Shader.mode.MATERIAL; //type of shader this.program_ = null; //program shader this.fragmentShader_ = null; //fragment shader this.vertexShader_ = null; //fragment shader this.vertexAttrib_ = null; //vertex attribute location ...
true
938116e49e98c1337b55f958ebf327078431dc7f
JavaScript
YuThree/oldGitIO
/3cweb/Common/js/6cweb/C1_Echart.js
UTF-8
29,560
2.546875
3
[]
no_license
/*========================================================================================* * 功能说明:1C 趋势图封装 * 作 者: tm * 版本日期:2017.6.20 * 参数说明: eventID 巡检单个设备事件ID,如果harddiskID为空,则通过eventID计算harddiskID与deviceID。 harddiskID 巡检ID(推荐使用) deviceID 设备ID(推荐使用) *==========================================...
true
05628797a3eb938304b04c50ac8d98c8f0f73888
JavaScript
Glanceman/P5-SM3601-Game
/player.js
UTF-8
2,451
3.140625
3
[ "MIT" ]
permissive
class player { constructor(initalx,initaly){ this.x=initalx/2; this.y=initaly/2; this.size=40; this.bubbles=[]; this.initialise=false; this.bubbleLifeSpan=-1; this.coolDown=60; } show(isAbilityOn){ push() noStroke() this.update(); if((isAbilityOn==false&&this.bubbleL...
true
79746b74628f4368d7fc9ab5fe60e7fd658e5cdc
JavaScript
MattRodigheri/movielist
/src/components/MovieList.js
UTF-8
1,458
3
3
[]
no_license
class MovieList extends React.Component { constructor() { super(); this.state = { movies: [ { title: 'Mean Girls' }, { title: 'Hackers' }, { title: 'The Grey' }, { title: 'Sunshine' }, { title: 'Ex Machina' } ], }; this.handleChange = this.handleCha...
true
886d8af792e2a35fbec54b7300836575ffd7cf50
JavaScript
Djboy08/Masterani-API
/index.js
UTF-8
1,844
2.84375
3
[]
no_license
const Masteranime = require("./main.js"); require('dotenv').config(); const client = new Masteranime.Client(); const fs = require('fs'); // let array = [ // { // anime_name: "name of anime", // anime_status: 1 || 2 || 3 || 4 || 6, // current_episode: 55 //OPTIONAL // } // ] let cypher = { "item w...
true
e7800fff1287eed288071f9403013362afb8f180
JavaScript
hwang1995/react_project
/src/views/Ch02JSX/Exam06EventHandling/ComBFunctionalEvent.jsx
UTF-8
559
2.859375
3
[]
no_license
const handleClick1 = () => { alert("hello world"); } const handleClick2 = (x, y) => { alert(x**y); } const ComBFunctionalEvent = (props) => ( <div className="card p-2"> <div className="card-header">ComBFunctionalEvent</div> <div className="card-body"> <button className="btn btn-info btn-sm mr-2"...
true
fa27f9429d37edcbca7d3178494a41bb7e3df82c
JavaScript
steelweb/numbersconverter
/fromRtoA.js
UTF-8
1,218
3.703125
4
[]
no_license
function fromRtoA (romannumber){ var romannumber = document.getElementById("input").value; var roman = romannumber.toUpperCase(); if(roman == null) return -1; var totalValue = 0, value = 0, // Initialise! prev = 0; for(var i=0;i<roman.length;...
true
c0b600dc062937fa2214abe90c17fadd83514605
JavaScript
abelcabezaroman/react-examples
/src/componentsWithHooks/CounterContext/CounterContext.js
UTF-8
624
2.53125
3
[]
no_license
import React, { useState } from 'react'; import './CounterContext.scss'; import CounterContext from "../CounterContext"; export const CounterWithContext = () => { const initialValue = Number(React.useContext(CounterContext)); const [count, setCount] = useState(initialValue); return ( <div classN...
true
abbf4ccb63b42ce58c439e2e2e5e0a23d3067d32
JavaScript
NajixR/TrickOrTreat
/sketch.js
UTF-8
1,697
3.25
3
[]
no_license
var player; var bucket; var points = 0; function setup() { createCanvas(400, 400); // put setup code here player = new Player(); bucket = new Bucket(); timerT = createP('timer ' + timeAmount); } var left = false; let right = false; let up = false; let down = false; function draw() { background(51); player.show()...
true
5a3abafd723cff7f50629d90d03bf1594ad47048
JavaScript
noamrubin22/spiral
/spiral-animation.js
UTF-8
941
3.703125
4
[]
no_license
function init() { window.requestAnimationFrame(draw); } function draw() { // Define a 2D ctx context and initialize the spiral parameters: var ctx = document.getElementById("myCanvas").getContext("2d"); var radius = 0; var angle = 0; // set the spiral style ctx.lineWidth = 4; ctx.strokeStyle = "#0096F...
true
4150121c9ab99621e2a3a75020209a4d931d9350
JavaScript
DispatchMe/meteor-accounts-sms
/sms_server.js
UTF-8
3,025
2.578125
3
[ "MIT" ]
permissive
var codes = new Mongo.Collection('meteor_accounts_sms'); Meteor.methods({ 'accounts-sms.sendVerificationCode': function (phone) { check(phone, String); return Accounts.sms.sendVerificationCode(phone); } }); // Handler to login with a phone number and code. Accounts.registerLoginHandler('sms', function (o...
true
c8ceacb740161a60a5742282630035d7eb30893c
JavaScript
nyatla/matatabi_contract
/ui/src/js/parts/StringInput.jsx
UTF-8
678
2.609375
3
[ "MIT" ]
permissive
import CustomInput from './CustomInput.jsx'; import {isUndefined} from "util"; /** * 最大文字列長さのあるinput * props.max 最大値 * props.min 最小値 */ export default class StringInput extends CustomInput { constructor(props) { super(props); } _reFormat(v) { if(v.length>this.props.max){ ...
true
15dc856109ccf87c7e0c3f3d4e47064308e0ffd0
JavaScript
mirtcode/master-g5
/5_Kata_Frontend_Avanzado/6_login_context/src/App.js
UTF-8
1,997
2.609375
3
[]
no_license
import React, { useReducer } from "react"; import { BrowserRouter as Router, Redirect, Route, Switch, } from "react-router-dom"; import "./App.css"; import routes from "./config/routes"; import { AuthProvider } from "./context"; import AppRoutes from "./components/AppRoutes"; function App() { // EJ...
true
d187dfc4975b0674682e1a0ae58f687c9e993b43
JavaScript
yashshah14093/Simon-Game
/index.js
UTF-8
1,782
3.125
3
[]
no_license
var buttonColors = ["red", "blue", "green", "yellow"]; var gamePattern = []; var userClickedPattern = []; var start = 0,level = 0; $(".btn").click(handleButtonClick); $(document).keypress(function () { if(start == 0){ start = 1; $("h1").html("Level "+level); nextSequence(); }else { ...
true
bd8628942f864f679f30140263835b1f5abf2ffe
JavaScript
ovayoza1/Quiz-app
/app.js
UTF-8
5,292
2.796875
3
[]
no_license
var mainArray = []; allQuestionsBtn = document.getElementById("showQuestions") var firebaseConfig = { apiKey: "AIzaSyDyB7f--bxJt2MNI4OvdC9PabVh8A0Wjh8", authDomain: "quiz-app-94099.firebaseapp.com", databaseURL: "https://quiz-app-94099.firebaseio.com", projectId: "quiz-app-94099", storageBucket: "quiz-app-...
true
ebc78d928dd1a31b070e70165dc1b7cfc7511393
JavaScript
SmitaVaijanath/EmployeeDetails
/employee-mgmt/src/App.js
UTF-8
2,995
2.890625
3
[]
no_license
import React, { Component } from 'react'; import './App.css'; class App extends Component { constructor(props) { super(props); this.state = { title: 'Employee Management', datas: [], act:0, }; } submit = (e) => { e.preventDefault(); let datas = this.state.d...
true
6a25c2a6059c1e1b2238a58a4c38097816d101fd
JavaScript
Exencial-Wealth/Reporting-Resources
/js/toggle_table_row_visibility.js
UTF-8
843
3.171875
3
[]
no_license
/* Function to toggle visibility of collapsed table rows. */ function toggleTableRowVisibility(){ const tableRowToggleButtons = document.querySelectorAll('td[data-toggle="collapse"]'); for (let i=0;i<tableRowToggleButtons.length;i++){ svgIcons = tableRowToggleButtons[i].querySelectorAll('svg'); for ...
true
c88e1f1b7e1b71fcf1a71b574a03629da4319785
JavaScript
yogagii/KittyGeneration
/src/assets/mixins/svgcatsStyle.js
UTF-8
5,232
2.625
3
[]
no_license
import { catsvg } from '../js/catsvg.js' import { colors } from '../js/matchcolours.js' var crossRate = 0.5; var mutateRate = 0.2; var svg1 = `<div class="cat"><svg viewBox="180 400 3000 3000" preserveAspectRatio="none"> <g clip-path="url(#kittyClipPath)"> <g id="tailFur">` var svg2 =`<g clip-path="url(#tailFurClipP...
true
34dddacbff17e7b500635c353b6eb5d4ebcd1f0a
JavaScript
scott-riley/web-audio-talk
/assets/js/canvas.js
UTF-8
2,514
3.15625
3
[]
no_license
var canvas = document.querySelector('#c'); var canvasContext = canvas.getContext("2d"); var canvasWidth = document.querySelector('.wrapper').clientWidth; var canvasHeight = document.querySelector('.wrapper').clientHeight; canvas.setAttribute('width', canvasWidth); canvas.setAttribute('height', canvasHeight); var dra...
true
1d7775acf0cc5a1aea690feaa2c1ff8f890d862c
JavaScript
jessebibee/sample-node-project
/src/sorter.js
UTF-8
725
2.859375
3
[]
no_license
import turfDistance from 'turf-distance'; import point from 'turf-point'; export function minDistance(fromCoordinates, accessor) { const fromLocations = fromCoordinates.map(c => point(c)); return function (a, b) { const pointA = point(accessor(a)); const pointB = point(accessor(b)); c...
true
34a07344a0f283f3806229628b1038fc7e4e2df8
JavaScript
Sebsterio/Restaurant-Page
/src/pages/menu-page.js
UTF-8
1,065
2.9375
3
[]
no_license
import { menu as menuData } from "../database"; // function buildTableRow(data, cellType) { const row = document.createElement("tr"); for (let i = 0; i < data.length; i++) { const cell = document.createElement(cellType); cell.innerHTML = data[i]; row.appendChild(cell); } return row; } // function buildTab...
true
b6d9eb81ca2db68a9f3ae3bdb457c163b2668985
JavaScript
pbrudnick/node-course
/05.first-class-functions.js
UTF-8
331
3.75
4
[ "MIT" ]
permissive
function sum(a, b) { return a + b; } const myFunc = sum; console.log(sum(1,1)); console.log(myFunc(1,1)); function SumANumber(fn, listOfNumbers, numberToSum) { const newList = []; listOfNumbers.forEach(n => { newList.push(fn(n, numberToSum)); }); return newList; } console.log(SumANumber(sum, [0,1,2,...
true
dae4ced9a21eb52a37030e655772c8c3900cfb00
JavaScript
orkula/GuitarResourceMVC
/GuitarResourceWebApplication/GuitarResourceWebApplication/Scripts/GuitarResourceLibrary/Common/SheetMusicFunctions.js
UTF-8
2,288
3.046875
3
[]
no_license
 var SheetMusicLibrary = { submitInputBoxSelector: '#noteinput', resultDisplaySelector: '#truefalsedisplay', generatedNote: "", clearCanvas: function (canvasElement) { canvasElement.empty(); }, generateRandomNoteAndDrawOnStave: function (noteArrayCopy, stringArrayCopy, canvasElement)...
true
ec9cbde6e003f78e677ccda7a90bd4c0388d376a
JavaScript
ivymar17/ivymar17
/transactions.js
UTF-8
3,878
2.703125
3
[]
no_license
"use strict"; var crypto = require("crypto"); var path = require("path"); var fs = require("fs"); var openpgp = require("openpgp"); const KEYS_DIR = path.join(__dirname,"keys"); const PRIV_KEY_TEXT = fs.readFileSync(path.join(KEYS_DIR,"priv.pgp.key"),"utf8"); const PUB_KEY_TEXT = fs.readFileSync(path.join(KEYS_DIR,"pu...
true
fae97d21cbb915f60fc9c3a7b4989a0e153dfc27
JavaScript
dvladimirovich/ContactManager
/src/ContactManager.WEB/wwwroot/js/contacts.js
UTF-8
3,681
2.78125
3
[]
no_license
function contactsDataSource(options, callback) { // define the columns for the table var columns = [ { "label": "Full Name", // column header label "property": "FirstName", // the JSON property you are binding to "sortable": true // is the column...
true
a93111f7a0d27bbf0181d7e1df3cb1ec917025ff
JavaScript
blsoko/reactTuto
/javascript_review/index_2.js
UTF-8
658
3.171875
3
[]
no_license
const mycats = { cats : { criollo : { breed1 : 'siames', breed2 : 'tiger', breed3 : 'Persa' } }, colors : ['black', 'white', 'brown'] }; let {breed2} = mycats.cats.criollo; // console.log(breed2, mycats.colors[0]); // const soygei = new Promise((resolve, ...
true
c4ebeb2e5f8b93404cb7590aeb26803ae6af69c0
JavaScript
ample/gatsby-starter-ample
/src/components/link/helpers/is-file.js
UTF-8
471
3.140625
3
[ "MIT" ]
permissive
/** * Accepts a URL path and returns if that path is a path to a non-HTML file. */ const isFile = (path) => { // Get the last segment in the path. const filename = path.split("/").pop() // Extract the file extension, if there is one. const ext = filename.lastIndexOf(".") >= 0 ? filename.split(".").pop() : nul...
true
e33df884ed7870dcb32969aeeaeec413f49bbbc0
JavaScript
Valaragen/RPG-bot
/object/Item.js
UTF-8
4,183
2.640625
3
[]
no_license
const config = require('../config.json'); const Discord = require('discord.js') //slot reminder : head, body, feet, hands, shoulder, one_handed, two_handed, shield, right_hand, left_hand //A collection with the rarity and the stat modifier ratio const rarityMod = new Discord.Collection(); rarityMod.set('Common', {mod...
true
ab8bc5164456526ceb39572eb0be7c861e69d7cf
JavaScript
phamvmnhut/NNnews
/src/Component/Setting/Setting.js
UTF-8
6,064
2.71875
3
[]
no_license
/** * NNnews App * https://github.com/phamvmnhut/NNnews * * Man hinh Setting * Cac cai dat cho nguoi dung */ import React, {Component} from 'react'; import { Alert, Image, Platform, StyleSheet, Text, TouchableHighlight, View, YellowBox, ScrollView, } from 'react-native'; import PropType...
true
7e3c9f2798303e4f30e64640b8c2f81d1fdde5b7
JavaScript
PheMA/phema-author
/services/lib/dataService/qdmRepository.js
UTF-8
2,850
2.609375
3
[ "Apache-2.0" ]
permissive
'use strict'; var request = require('request'); // Provides a simple wrapper around the QDM2RDF web service // We wrap this so we can safely invoke from our client without having to // worry about cross-domain requests. var QDMRepository = function(baseURL) { this.baseURL = baseURL; } QDMRepository.prototype.getC...
true
f4e819e206b14f77dfb41708fa553f9f9ba7c0c8
JavaScript
mourner/geoflatbush
/bench.mjs
UTF-8
1,179
3.234375
3
[ "ISC" ]
permissive
import cities from 'all-the-cities'; import FlatBush from 'flatbush'; import {around} from './index.mjs'; const n = cities.length; const k = 100000; const randomPoints = []; for (let i = 0; i < k; i++) randomPoints.push({ lon: -180 + 360 * Math.random(), lat: -60 + 140 * Math.random() }); console.time(`inde...
true
2d1cf5071b01bc1e03ab1a5e8d69f22b469bb00d
JavaScript
ameily/mr-issue
/redmine.js
UTF-8
8,437
2.59375
3
[ "ISC" ]
permissive
/// /// @copyright 2015 Adam Meily <meily.adam@gmail.com> /// var request = require('request'); var fs = require('fs'); var util = require('util'); var url = require('url'); var async = require('async'); var _ = require('underscore'); var logger = require('./logger'); function Redmine(config, cb) { this.config = ...
true
5e7fb7e454781c83efaaa7b78fb7940a17d38ff1
JavaScript
vasyabester/epam_fe_2019_tyurin
/src/js/main/views/mainLatestPortfolioView.js
UTF-8
4,730
2.796875
3
[ "Apache-2.0" ]
permissive
/* eslint-disable */ export function renderLatestPortfolio(contentEl, data) { const sectionEl = document.createElement('section'); sectionEl.className = 'latest-portfolio'; sectionEl.id = 'portfolio'; sectionEl.insertAdjacentHTML('afterbegin', ` <div class="container"> <div class="row"> <div ...
true
32faf0f60a6192393fc179c0bcd179cde175317d
JavaScript
gregkepler/cinder-path2d-docs
/javascript/src/js/part3.js
UTF-8
12,282
2.546875
3
[]
no_license
(function($, window) { // +———————————————————————————————————————+ // CalcBoundsSketch // +———————————————————————————————————————+ cidocs.CalcBoundsSketch = function( options ) { cidocs.Path2dSketch.call( this, options ); } cidocs.CalcBoundsSketch.prototype = { initialize: function( options ) { this...
true
2a5ea485296204ae284acce5049b57b47e60beb8
JavaScript
martenc/javascript-tracker-via-cookie
/me/pls.js
UTF-8
2,515
2.78125
3
[]
no_license
// http://www.quirksmode.org/ function createTRCCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readTRCCookie...
true
fe9332a56c5a163cc51962cf74783cbed8da21f4
JavaScript
Kheridan/challengeBotify
/src/index.js
UTF-8
4,476
2.703125
3
[]
no_license
import '../css/reset.css'; import '../css/index.css'; import '../css/list.css'; import '../css/main.css'; import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; import { createStore } from "redux"; let commentId = 0; // reducer permettant de gérer un unique commentaire à la fois // s'u...
true
c60dd67263e43cf1052bdd8938a2d719405d9d37
JavaScript
dmsnell/js-requests
/index.js
UTF-8
3,785
2.640625
3
[]
no_license
/** @format */ export { delayAction, enhancer as delayEnhancer } from './task-delay'; export { http, enhancer as httpEnhancer } from './task-http'; const REQUEST_UPDATE = '@@js-request/update'; export const storage = new Map(); const empty = Object.freeze( { state: 'uninitialized', data: undefined, error: undefin...
true
16d8cc5a4a0678e963482d1fd3f931c21556b8d3
JavaScript
frame-creator/javascript_coding_test
/card.js
UTF-8
1,558
3.78125
4
[]
no_license
//준규는 숫자 카드 N장을 가지고 있다. 숫자 카드에는 정수가 하나 적혀있는데, 적혀있는 수는 -262보다 크거나 같고, 262보다 작거나 같다. //준규가 가지고 있는 카드가 주어졌을 때, 가장 많이 가지고 있는 정수를 구하는 프로그램을 작성하시오. 만약, 가장 많이 가지고 있는 정수가 여러 가지라면, 작은 것을 출력한다. /// const [n, ...arr] = require("fs").readFileSync("/dev/stdin").toString().trim().split("\n"); function mergeSort(arr) { if (a...
true
3d623b34b3f3ad05155f45470ac332fea8decc06
JavaScript
Str1ng/TaxiManagementSystem
/TaxiManagementSystem/api.js
UTF-8
9,500
2.65625
3
[]
no_license
//去除网页中的连接地址 window.onload = inifA; function inifA() { for (var i = 0; i < document.getElementsByTagName("a").length; i++) { document.getElementsByTagName("a")[i].onclick = function () { return false } } } //*定义必要的公共变量 var maker;//标注对象 var distance;//测距对象 var drawingManager;//绘图对象 var drag;//拖框缩放对象 //绘...
true
55239065d8e6fe9ff0862085b47246a1efee2676
JavaScript
bybybybybyby/Javascript-Expressions-in-JSX
/src/index.js
UTF-8
454
3.515625
4
[]
no_license
import React from "react"; import ReactDOM from "react-dom"; const fName = "Bro"; const lName = "Ski"; const num = 8; ReactDOM.render( <div> <h1> Hello {fName} {lName}! </h1> {/* Same result as above */} <h1>Hello {fName + " " + lName}!</h1> <p>Your lucky number is {num}!</p> {/* Us...
true
0caf808cdaa27d5d988593bbd28b2de6730fc3c8
JavaScript
varun207/blog-laravel
/public/js/weather-scripts.js
UTF-8
2,724
3.4375
3
[]
no_license
var cityInput = document.getElementById('cityInput'); document.querySelector('form.pure-form').addEventListener('submit', function(e) { document.getElementById("root").innerHTML = ""; e.preventDefault(); var key = '9cfbdba049714e24491d7eb24a81a427'; // 'https://api.openweathermap.org/data/2.5/weather?id=' + ci...
true
7cf449b875229c31a1e9f3d289e5a22279829216
JavaScript
desmond-awung/learning-react
/src/components/Greet.js
UTF-8
825
3.46875
3
[]
no_license
import React from 'react' // we use PascalCase for names of components // preference is to use arrow functions // also make sure that what we return is under a single HTML element // const Greet = () => { // return <h1> Hello Desmond </h1> // } // using destructuring in the parameter - get the fields with these n...
true
9358950437c11dc12eff453e239c882a3a49be65
JavaScript
gerauf/functional-rps
/test/core_spec.js
UTF-8
4,550
2.890625
3
[]
no_license
import {Map, fromJS} from 'immutable' import {expect} from 'chai'; import {setNames, setRules, play, playAgain, changeRules} from '../src/core' describe('application logic', () => { describe('#setName()', () => { it('adds player names to the state', () => { const state = Map() const player1 = 'Ryu...
true
f47f15c89f815d75c020bc969aaf42d9a3255743
JavaScript
dfarrenk/memory-game-react
/src/App.js
UTF-8
1,867
2.9375
3
[]
no_license
import React, { Component } from 'react'; import TarotCard from "./components/TarotCard"; import Wrapper from "./components/Wrapper"; //Drop this later maybe. import Title from "./components/Title"; import tarot from "./tarot.json"; import './App.css'; class App extends Component { state = { tarot, cardsCli...
true
75158cea9375a3eeb3fb487f49c5b63240e85b82
JavaScript
tsupo001/Emoji_game_prototype1
/src/targetImg.js
UTF-8
2,639
2.59375
3
[]
no_license
var config = { apiKey: "AIzaSyDachk_9QujOsIUtMu__GyBCyN6CmqUt10", authDomain: "creative-project-142a8.firebaseapp.com", databaseURL: "https://creative-project-142a8.firebaseio.com", projectId: "creative-project-142a8", storageBucket: "creative-project-142a8.appspot.com", messagingSenderId: "1981...
true
a7e3ba3546ef35d83ff22d547a81da659e78e400
JavaScript
KaveenLaksitha/chi-lanka-API
/service/supplierService.js
UTF-8
4,372
2.71875
3
[]
no_license
const router = require("express").Router(); let Supplier = require("../class/Supplier"); const { v4: uuidv4 } = require("uuid"); router.route("/addSupplier").post((req, res) => { const supplierid = uuidv4(); const suppliername = req.body.suppliername; const address = req.body.address; const contactnumb...
true
58f396f92a8720aea5c2ba60f174d5b0f1a97bb2
JavaScript
syifa-ayu/tugas-arkademy
/rename.js
UTF-8
463
2.953125
3
[]
no_license
const fs = require('fs'); console.log('start reading a file...'); fs.readFile('txt.txt', 'utf-8', (err, content)=>{ if(err) { console.log ('error happened during reading the file'); return console.log(err); } console.log("yeay, berhasil! Datanya: " + content); fs.rename('txt.txt', 'ter...
true
da703ad563e2859cc3ae8b5fd45bed55fb755cf5
JavaScript
cxw13424219787/firstGit
/美团APP/src/js/lazyload.js
UTF-8
4,341
2.734375
3
[]
no_license
$(function(){ /* 懒加载效果 1)页面载入时请求部分数据 2)当滚动条滚动到接近底部时,加载更多的数据 给window绑定scroll事件 */ // 点击toTop标签回到顶部 $("#toTop").hide(); $("#toTop").click(function(){ $('html,body').scrollTop(0); }) // 获取页面元素 //先加载第一个json文件 var index = 1; //一开始直接加载十条,先出现加载的gif图,过一秒后再加载出来 $('#loading').show(); setTimeout(function(...
true
caf0682364c5a24ebedf7e039ee0a0179b2f8e50
JavaScript
olegchabak/jsbasic-20200127-2_oleg-chabak
/5-module/2-task/index.js
UTF-8
3,563
3.859375
4
[]
no_license
/** * Компонент, который реализует сортируемую таблицу * @param {Array} items - данные, которые нужно отобразить * * Пример одного элемента, описывающего строку таблицы * * { * name: 'Ilia', * age: 25, * salary: '1000', * city: 'Petrozavodsk' * }, * * @construc...
true
145eeb79b832e77c9a46f725d8263c9bbfe94716
JavaScript
Fares-dev-Mohamed/API-CHECKPOINT
/src/Components/Personne.js
UTF-8
1,207
2.5625
3
[]
no_license
const Personne =({personne})=>{ return ( <div className="personne"> <h3>Coordonnes :</h3> <h4>{`Name : ${personne.name}`}</h4> <h4>{`Username : ${personne.username}`}</h4> <h4>{`Email : ${personne.email}`}</h4> <div className="address"> <h3>ADDRE...
true
10bb351bfab2f3583e5ed03ac0a8854c633db721
JavaScript
FanshaweChiMai/Mai_C_Portfolio
/js/main.js
UTF-8
652
2.765625
3
[]
no_license
(function(){ var projectList = document.querySelectorAll('#projectList ul'); function callCover(){ let projectImg = document.querySelector('#projectImg a img'); let designData = designCover[this.id]; let developData = developCover[this.is]; while (projectImg.firstChild){ projectImg.removeChild(pr...
true
4d1b4f7ca399eb4111a9d70675a5651b73b6a58e
JavaScript
andrewraynal/halfwayapp
/app/scripts/geo.js
UTF-8
4,830
2.875
3
[]
no_license
function writeAddressName(latLng) { var geocoder = new google.maps.Geocoder(); geocoder.geocode({ "location": latLng }, function(results, status) { if (status == google.maps.GeocoderStatus.OK) document.getElementById("address").innerHTML = results[0].fo...
true
058cc2504d3bbd71f0330c82d07f7693f528b596
JavaScript
stursby/jquery-angled-borders
/src/source.js
UTF-8
2,610
2.5625
3
[]
no_license
;(function($) { 'use strict'; $.fn.angledBorder = function (options) { // defaults var defaults = { height: 30, // in px color: 'inherit', // hex value direction: 'LTR', // or RTL position: 'bottom' // or top }, settings = $.extend({},...
true
b79298801860c7670e764df2e07043432c312d66
JavaScript
Luizagalf/homework-week17
/Спамфильтр/index.js
UTF-8
409
3.0625
3
[]
no_license
let checkSpam = (str) => { if (!str) return str; str = str.replace(/viagra/i, "***"); str = str.replace(/xxx/i, "***"); return str; } let comments = []; let send = () => { let message = document.getElementById("message").value; comments.push(checkSpam (message)); document.getElementById("co...
true
c52ba50b5fbcb632bf404d36e2a39a6502fe2204
JavaScript
Aerodyll/Dicey
/dicey/scripts.js
UTF-8
3,190
3.75
4
[]
no_license
var button = document.getElementById("rollButton"); // Describing what the button will do once clicked button.onclick = function() { if (document.getElementById("LSB").childElementCount == 5) { alert("It looks like player 1 has won, click OK to reload and try again!"); button.innerHTML = ("Relo...
true
40c825806526715f7fd852c2c3d5537c113f8d08
JavaScript
ronaldoskibinski/projeto-eagle
/src/include/js/signup.js
UTF-8
663
3.0625
3
[]
no_license
// VERIFICA EMAIL function emailIsValid(){ email = document.getElementById('email'); request = new XMLHttpRequest(); authUser(this.email.value); function authUser(email, password) { request.open('GET', '../services/auth.php?email='+ email, true); request.send(); } re...
true
a9b5e4a652061cd5c4a60edc1436e9e47430962e
JavaScript
maiyama18/profile
/img/artworks/js/planetoid.js
UTF-8
4,141
2.953125
3
[]
no_license
const NUM_HEAVY_PARTICLES = 100; const NUM_LIGHT_PARTICLES = 150; const MAX_HEAVY_PARTICLE_RADIUS = 5; const MAX_LIGHT_PARTICLE_RADIUS = 1.5; const HEAVY_PARTICLE_FRICTION = 0.001; const LIGHT_PARTICLE_FRICTION = 0.0002; const MAX_V0 = 10; const particles = [] function setup() { createCanvas(windowWidth, windowHe...
true
8b3b6ef697542315e97a2ee10b4caddfa81f0e9b
JavaScript
paryos/clueless
/public/javascripts/Disprove.js
UTF-8
2,586
2.625
3
[]
no_license
(function () { 'use strict'; var _ = require('lodash'); var disproveModal = '#disprove-suggestion-modal'; var cardSelect = '#card-select'; var confirmDisproveButton = '#confirm-disprove'; var cannotDisproveButton = '#cannot-disprove'; var disproveHint = '#disprove-hint'; var gameSocket...
true
afb49d18b0f8407ee48d435783d6a7fb2581d542
JavaScript
sn220865/coding_study
/programmers/substr.js
UTF-8
346
3.296875
3
[]
no_license
function solution(s) { var answer = 0; var alphebet = ['a','b','c','d','e','f','g','h','i','j', 'k','l','m','n','o','p','q','r','s','t','u', 'v','x','y','z']; for(var i=1;i<=Math.floor(s.length/2);i++){ var words = s.split(''); console.log(words); } ...
true
0fe143e5b421df81c63ebc309693f55d54410be7
JavaScript
blackseliger/Credit-Card-Validator
/src/pages/validator/index.js
UTF-8
1,679
2.78125
3
[]
no_license
import CardValidator from "../../components/cardValidator"; export default class Page { subElements = {}; components = {}; render() { const element = document.createElement('div'); element.innerHTML = this.getTemplate(); this.element = element.firstElementChild; this.s...
true
fec2a226d0bbdc33cabb4239a6f55d9d03efa24d
JavaScript
alchucam/DRAA
/client/src/Components/Chart.js
UTF-8
2,642
2.59375
3
[ "MIT" ]
permissive
import React, { Component } from "react"; import Plot from 'react-plotly.js'; //chart class for display plotly charts in mutate page. export default class Chart extends Component { constructor(props){ super(props); this.state = {width: window.innerWidth, height: window.innerHeight }; this.getWindow...
true
d1a1f361dfab73368e5b95624eb0742873aa13d7
JavaScript
prahaladbelavadi/bip39
/examples/4.validate-mnemonic.js
UTF-8
470
3.578125
4
[ "ISC" ]
permissive
// Checks if mnemonic is valid(provides >128 bits of entropy) var bip39 = require('../') var mnemonic = 'legend trust army surround organ clinic man impose arrow language island can' // true implies it is valid and false imples that mnemonic is invalid function val (mnemonic) { if (bip39.validateMnemonic(mnemonic)...
true
c82f6e3c847b5dc37846cd85cd992662e4400a3b
JavaScript
AAI-USZ/FixJS
/input/50/before/6fce8f1601f32555ebebd603c824e05a16d68282_11_2.js
UTF-8
334
2.53125
3
[ "MIT" ]
permissive
function (amount) { if (amount == 0) { message = 'Build fixed'; details = 'Build 123 fixed'; } else { message = 'Build failed'; details = 'Build 123 failed'; } failedBuildsCount = amount; return t...
true
3beb3c4f48f7358502f0090007ebc9191fb9866a
JavaScript
manuelf18/nicknames-sol
/test/nickname_test.js
UTF-8
2,618
2.703125
3
[]
no_license
const truffleAssert = require('truffle-assertions'); const Nicknames = artifacts.require("./Nickname.sol"); contract("Nicknames", accounts => { let myNickname = "Osito"; it(`should store the nickname ${myNickname}`, async () => { const Contract = await Nicknames.deployed(); // Set nickname try{ ...
true
03d82525e930af3dae6aaf0c8dad326425acace4
JavaScript
reynoldadade/examApp
/api/data/db.js
UTF-8
1,486
2.609375
3
[]
no_license
var mongoose = require('mongoose');//requiring mongoose var dburl = 'mongodb://localhost:27017/examApp';//connection string to the database mongoose.connect(dburl , {useNewUrlParser: true});//connecting to the databse tring from mongoose mongoose.connection.on('connected',function () {//when connection is successful...
true