repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/setInfrared.js | lib/lifx/packets/setInfrared.js | 'use strict';
var Packet = {
size: 2
};
/**
* Converts packet specific data from a buffer to an object
* @param {Buffer} buf Buffer containing only packet specific data no header
* @return {Object} Information contained in packet
*/
Packet.toObject = function(buf) {
var obj = {};
var offset = 0;
if ... | javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/getHostFirmware.js | lib/lifx/packets/getHostFirmware.js | 'use strict';
var Packet = {
size: 0
};
module.exports = Packet;
| javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/statePower.js | lib/lifx/packets/statePower.js | 'use strict';
var Packet = {
size: 2
};
/**
* Converts packet specific data from a buffer to an object
* @param {Buffer} buf Buffer containing only packet specific data no header
* @return {Object} Information contained in packet
*/
Packet.toObject = function(buf) {
var obj = {};
var offset = 0;
if ... | javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/getLocation.js | lib/lifx/packets/getLocation.js | 'use strict';
var Packet = {
size: 0
};
module.exports = Packet;
| javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/setPower.js | lib/lifx/packets/setPower.js | 'use strict';
var Packet = {
size: 6
};
/**
* Converts packet specific data from a buffer to an object
* @param {Buffer} buf Buffer containing only packet specific data no header
* @return {Object} Information contained in packet
*/
Packet.toObject = function(buf) {
var obj = {};
var offset = 0;
if ... | javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/getWifiInfo.js | lib/lifx/packets/getWifiInfo.js | 'use strict';
var Packet = {
size: 0
};
module.exports = Packet;
| javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/stateAmbientLight.js | lib/lifx/packets/stateAmbientLight.js | 'use strict';
var Packet = {
size: 4
};
/**
* Converts packet specific data from a buffer to an object
* @param {Buffer} buf Buffer containing only packet specific data no header
* @return {Object} Information contained in packet
*/
Packet.toObject = function(buf) {
var obj = {};
var offset = 0;
if ... | javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/stateOwner.js | lib/lifx/packets/stateOwner.js | 'use strict';
var utils = require('../../lifx').utils;
var Packet = {
size: 56
};
/**
* Converts packet specific data from a buffer to an object
* @param {Buffer} buf Buffer containing only packet specific data no header
* @return {Object} Information contained in packet
*/
Packet.toObject = function(buf)... | javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/getGroup.js | lib/lifx/packets/getGroup.js | 'use strict';
var Packet = {
size: 0
};
module.exports = Packet;
| javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/setLabel.js | lib/lifx/packets/setLabel.js | 'use strict';
var Packet = {
size: 32
};
/**
* Converts packet specific data from a buffer to an object
* @param {Buffer} buf Buffer containing only packet specific data no header
* @return {Object} Information contained in packet
*/
Packet.toObject = function(buf) {
var obj = {};
var offset = 0;
if... | javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/stateInfrared.js | lib/lifx/packets/stateInfrared.js | 'use strict';
var Packet = {
size: 2
};
/**
* Converts packet specific data from a buffer to an object
* @param {Buffer} buf Buffer containing only packet specific data no header
* @return {Object} Information contained in packet
*/
Packet.toObject = function(buf) {
var obj = {};
var offset = 0;
if ... | javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/stateVersion.js | lib/lifx/packets/stateVersion.js | 'use strict';
var _ = require('lodash');
var constants = require('../../lifx').constants;
var Packet = {
size: 12
};
/**
* Converts packet specific data from a buffer to an object
* @param {Buffer} buf Buffer containing only packet specific data no header
* @return {Object} Information contained in packet
... | javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/stateLocation.js | lib/lifx/packets/stateLocation.js | 'use strict';
var utils = require('../../lifx').utils;
var Packet = {
size: 56
};
/**
* Converts packet specific data from a buffer to an object
* @param {Buffer} buf Buffer containing only packet specific data no header
* @return {Object} Information contained in packet
*/
Packet.toObject = function(buf)... | javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
MariusRumpf/node-lifx | https://github.com/MariusRumpf/node-lifx/blob/58c1ce8445e0ba2adc06382317c1f5247d9779fe/lib/lifx/packets/stateWifiFirmware.js | lib/lifx/packets/stateWifiFirmware.js | 'use strict';
var utils = require('../../lifx').utils;
var Packet = {
size: 20
};
/**
* Converts packet specific data from a buffer to an object
* @param {Buffer} buf Buffer containing only packet specific data no header
* @return {Object} Information contained in packet
*/
Packet.toObject = function(buf)... | javascript | MIT | 58c1ce8445e0ba2adc06382317c1f5247d9779fe | 2026-01-05T03:44:33.466432Z | false |
react-dnd/react-dnd-html5-backend | https://github.com/react-dnd/react-dnd-html5-backend/blob/1d7573c1eb85d040fd1029715e7dbb0e5121e9b3/webpack.config.js | webpack.config.js | var webpack = require('webpack');
module.exports = {
entry: './src/index',
module: {
loaders: [
{ test: /\.js$/, loader: 'babel', exclude: /node_modules/ }
]
},
output: {
filename: 'dist/ReactDnDHTML5Backend.min.js',
libraryTarget: 'umd',
library: 'ReactDnDHTML5Backend'
},
plugins... | javascript | MIT | 1d7573c1eb85d040fd1029715e7dbb0e5121e9b3 | 2026-01-05T03:44:34.412039Z | false |
react-dnd/react-dnd-html5-backend | https://github.com/react-dnd/react-dnd-html5-backend/blob/1d7573c1eb85d040fd1029715e7dbb0e5121e9b3/src/MonotonicInterpolant.js | src/MonotonicInterpolant.js | /* eslint
no-plusplus: off,
no-mixed-operators: off
*/
export default class MonotonicInterpolant {
constructor(xs, ys) {
const length = xs.length;
// Rearrange xs and ys so that xs is sorted
const indexes = [];
for (let i = 0; i < length; i++) {
indexes.push(i);
}
indexes.sort((a,... | javascript | MIT | 1d7573c1eb85d040fd1029715e7dbb0e5121e9b3 | 2026-01-05T03:44:34.412039Z | false |
react-dnd/react-dnd-html5-backend | https://github.com/react-dnd/react-dnd-html5-backend/blob/1d7573c1eb85d040fd1029715e7dbb0e5121e9b3/src/EnterLeaveCounter.js | src/EnterLeaveCounter.js | import union from 'lodash/union';
import without from 'lodash/without';
export default class EnterLeaveCounter {
constructor() {
this.entered = [];
}
enter(enteringNode) {
const previousLength = this.entered.length;
const isNodeEntered = node => (
document.documentElement.contains(node) &&
... | javascript | MIT | 1d7573c1eb85d040fd1029715e7dbb0e5121e9b3 | 2026-01-05T03:44:34.412039Z | false |
react-dnd/react-dnd-html5-backend | https://github.com/react-dnd/react-dnd-html5-backend/blob/1d7573c1eb85d040fd1029715e7dbb0e5121e9b3/src/getEmptyImage.js | src/getEmptyImage.js | let emptyImage;
export default function getEmptyImage() {
if (!emptyImage) {
emptyImage = new Image();
emptyImage.src = 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';
}
return emptyImage;
}
| javascript | MIT | 1d7573c1eb85d040fd1029715e7dbb0e5121e9b3 | 2026-01-05T03:44:34.412039Z | false |
react-dnd/react-dnd-html5-backend | https://github.com/react-dnd/react-dnd-html5-backend/blob/1d7573c1eb85d040fd1029715e7dbb0e5121e9b3/src/index.js | src/index.js | import HTML5Backend from './HTML5Backend';
import getEmptyImage from './getEmptyImage';
import * as NativeTypes from './NativeTypes';
export { NativeTypes, getEmptyImage };
export default function createHTML5Backend(manager) {
return new HTML5Backend(manager);
}
| javascript | MIT | 1d7573c1eb85d040fd1029715e7dbb0e5121e9b3 | 2026-01-05T03:44:34.412039Z | false |
react-dnd/react-dnd-html5-backend | https://github.com/react-dnd/react-dnd-html5-backend/blob/1d7573c1eb85d040fd1029715e7dbb0e5121e9b3/src/NativeDragSources.js | src/NativeDragSources.js | import * as NativeTypes from './NativeTypes';
function getDataFromDataTransfer(dataTransfer, typesToTry, defaultValue) {
const result = typesToTry.reduce((resultSoFar, typeToTry) =>
resultSoFar || dataTransfer.getData(typeToTry),
null,
);
return (result != null) ? // eslint-disable-line eqeqeq
resul... | javascript | MIT | 1d7573c1eb85d040fd1029715e7dbb0e5121e9b3 | 2026-01-05T03:44:34.412039Z | false |
react-dnd/react-dnd-html5-backend | https://github.com/react-dnd/react-dnd-html5-backend/blob/1d7573c1eb85d040fd1029715e7dbb0e5121e9b3/src/BrowserDetector.js | src/BrowserDetector.js | import memoize from 'lodash/memoize';
export const isFirefox = memoize(() => /firefox/i.test(navigator.userAgent));
export const isSafari = memoize(() => Boolean(window.safari));
| javascript | MIT | 1d7573c1eb85d040fd1029715e7dbb0e5121e9b3 | 2026-01-05T03:44:34.412039Z | false |
react-dnd/react-dnd-html5-backend | https://github.com/react-dnd/react-dnd-html5-backend/blob/1d7573c1eb85d040fd1029715e7dbb0e5121e9b3/src/OffsetUtils.js | src/OffsetUtils.js | /* eslint
no-mixed-operators: off
*/
import { isSafari, isFirefox } from './BrowserDetector';
import MonotonicInterpolant from './MonotonicInterpolant';
const ELEMENT_NODE = 1;
export function getNodeClientOffset(node) {
const el = node.nodeType === ELEMENT_NODE ?
node :
node.parentElement;
if (!el) {... | javascript | MIT | 1d7573c1eb85d040fd1029715e7dbb0e5121e9b3 | 2026-01-05T03:44:34.412039Z | false |
react-dnd/react-dnd-html5-backend | https://github.com/react-dnd/react-dnd-html5-backend/blob/1d7573c1eb85d040fd1029715e7dbb0e5121e9b3/src/HTML5Backend.js | src/HTML5Backend.js | import defaults from 'lodash/defaults';
import shallowEqual from './shallowEqual';
import EnterLeaveCounter from './EnterLeaveCounter';
import { isFirefox } from './BrowserDetector';
import { getNodeClientOffset, getEventClientOffset, getDragPreviewOffset } from './OffsetUtils';
import { createNativeDragSource, matchNa... | javascript | MIT | 1d7573c1eb85d040fd1029715e7dbb0e5121e9b3 | 2026-01-05T03:44:34.412039Z | false |
react-dnd/react-dnd-html5-backend | https://github.com/react-dnd/react-dnd-html5-backend/blob/1d7573c1eb85d040fd1029715e7dbb0e5121e9b3/src/shallowEqual.js | src/shallowEqual.js | export default function shallowEqual(objA, objB) {
if (objA === objB) {
return true;
}
const keysA = Object.keys(objA);
const keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
}
// Test for A's keys different from B.
const hasOwn = Object.prototype.hasOwnProperty;
... | javascript | MIT | 1d7573c1eb85d040fd1029715e7dbb0e5121e9b3 | 2026-01-05T03:44:34.412039Z | false |
react-dnd/react-dnd-html5-backend | https://github.com/react-dnd/react-dnd-html5-backend/blob/1d7573c1eb85d040fd1029715e7dbb0e5121e9b3/src/NativeTypes.js | src/NativeTypes.js | export const FILE = '__NATIVE_FILE__';
export const URL = '__NATIVE_URL__';
export const TEXT = '__NATIVE_TEXT__';
| javascript | MIT | 1d7573c1eb85d040fd1029715e7dbb0e5121e9b3 | 2026-01-05T03:44:34.412039Z | false |
react-dnd/react-dnd-html5-backend | https://github.com/react-dnd/react-dnd-html5-backend/blob/1d7573c1eb85d040fd1029715e7dbb0e5121e9b3/test/index.js | test/index.js | javascript | MIT | 1d7573c1eb85d040fd1029715e7dbb0e5121e9b3 | 2026-01-05T03:44:34.412039Z | false | |
frederfred/fontanello | https://github.com/frederfred/fontanello/blob/11632a678cd9e67f6ccfdc44c505ae45a1bb5917/src/background.js | src/background.js | const menuItems = {
family: { value: '', defaultValue: 'Please', onclick: copy },
weight: { value: '', defaultValue: 'reload', onclick: copy },
size: { value: '', defaultValue: 'the', onclick: copy },
color: { value: '', defaultValue: 'page', onclick: copy },
letterSpacing: { value: '', defaultValue: '(•‿•)',... | javascript | MIT | 11632a678cd9e67f6ccfdc44c505ae45a1bb5917 | 2026-01-05T03:44:36.965515Z | false |
frederfred/fontanello | https://github.com/frederfred/fontanello/blob/11632a678cd9e67f6ccfdc44c505ae45a1bb5917/src/offscreen.js | src/offscreen.js | chrome.runtime.onMessage.addListener(handleMessages);
const textEl = document.getElementById('textarea');
async function handleMessages(message) {
// Return early if this message isn't meant for the offscreen document.
if (message.target !== 'offscreen-doc') {
return;
}
// Dispatch the message to an appr... | javascript | MIT | 11632a678cd9e67f6ccfdc44c505ae45a1bb5917 | 2026-01-05T03:44:36.965515Z | false |
frederfred/fontanello | https://github.com/frederfred/fontanello/blob/11632a678cd9e67f6ccfdc44c505ae45a1bb5917/src/client.js | src/client.js | let previousTarget = null;
function getBgColor(el) {
const defaultBg = 'rgba(0, 0, 0, 0)';
while (el.parentNode) {
const computedBg = window.getComputedStyle(el).backgroundColor;
el = el.parentNode;
if (computedBg !== defaultBg) {
return computedBg;
}
}
return defaultBg;
}
function o... | javascript | MIT | 11632a678cd9e67f6ccfdc44c505ae45a1bb5917 | 2026-01-05T03:44:36.965515Z | false |
vivek-nexus/transcriptonic | https://github.com/vivek-nexus/transcriptonic/blob/5cd4c66fb4edf638f337542b4372d08db2af4cd9/extension/content-teams.js | extension/content-teams.js | // @ts-check
/// <reference path="../types/chrome.d.ts" />
/// <reference path="../types/index.js" />
let isTeamsInjected = false
setInterval(() => {
// Meeting lobby
const isJoinButtonFound = document.querySelector("#prejoin-join-button")
// On the meeting lobby and main teams function is not running, inject ... | javascript | MIT | 5cd4c66fb4edf638f337542b4372d08db2af4cd9 | 2026-01-05T03:44:17.677518Z | false |
vivek-nexus/transcriptonic | https://github.com/vivek-nexus/transcriptonic/blob/5cd4c66fb4edf638f337542b4372d08db2af4cd9/extension/content-zoom.js | extension/content-zoom.js | // @ts-check
/// <reference path="../types/chrome.d.ts" />
/// <reference path="../types/index.js" />
let isZoomRunning = false
setInterval(() => {
// Meeting page
const zoomUrlPattern = /^https:\/\/app\.zoom\.us\/wc\/\d+\/.+$/
const isZoomUrlMatching = zoomUrlPattern.test(location.href)
// On the meeting pa... | javascript | MIT | 5cd4c66fb4edf638f337542b4372d08db2af4cd9 | 2026-01-05T03:44:17.677518Z | false |
vivek-nexus/transcriptonic | https://github.com/vivek-nexus/transcriptonic/blob/5cd4c66fb4edf638f337542b4372d08db2af4cd9/extension/background.js | extension/background.js | // @ts-check
/// <reference path="../types/chrome.d.ts" />
/// <reference path="../types/index.js" />
/** @type {Intl.DateTimeFormatOptions} */
const timeFormat = {
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit",
hour12: true
}
chrome.runtime.onMessage.a... | javascript | MIT | 5cd4c66fb4edf638f337542b4372d08db2af4cd9 | 2026-01-05T03:44:17.677518Z | false |
vivek-nexus/transcriptonic | https://github.com/vivek-nexus/transcriptonic/blob/5cd4c66fb4edf638f337542b4372d08db2af4cd9/extension/popup.js | extension/popup.js | // @ts-check
/// <reference path="../types/chrome.d.ts" />
/// <reference path="../types/index.js" />
window.onload = function () {
const autoModeRadio = document.querySelector("#auto-mode")
const manualModeRadio = document.querySelector("#manual-mode")
const versionElement = document.querySelector("#version")
... | javascript | MIT | 5cd4c66fb4edf638f337542b4372d08db2af4cd9 | 2026-01-05T03:44:17.677518Z | false |
vivek-nexus/transcriptonic | https://github.com/vivek-nexus/transcriptonic/blob/5cd4c66fb4edf638f337542b4372d08db2af4cd9/extension/content.js | extension/content.js | // @ts-check
/// <reference path="../types/chrome.d.ts" />
/// <reference path="../types/index.js" />
//*********** GLOBAL VARIABLES **********//
/** @type {ExtensionStatusJSON} */
const extensionStatusJSON_bug = {
"status": 400,
"message": `<strong>TranscripTonic encountered a new error</strong> <br /> Please re... | javascript | MIT | 5cd4c66fb4edf638f337542b4372d08db2af4cd9 | 2026-01-05T03:44:17.677518Z | false |
vivek-nexus/transcriptonic | https://github.com/vivek-nexus/transcriptonic/blob/5cd4c66fb4edf638f337542b4372d08db2af4cd9/extension/meetings.js | extension/meetings.js | // @ts-check
/// <reference path="../types/chrome.d.ts" />
/// <reference path="../types/index.js" />
let isMeetingsTableExpanded = false
document.addEventListener("DOMContentLoaded", function () {
const webhookUrlForm = document.querySelector("#webhook-url-form")
const webhookUrlInput = document.querySelecto... | javascript | MIT | 5cd4c66fb4edf638f337542b4372d08db2af4cd9 | 2026-01-05T03:44:17.677518Z | false |
vivek-nexus/transcriptonic | https://github.com/vivek-nexus/transcriptonic/blob/5cd4c66fb4edf638f337542b4372d08db2af4cd9/types/index.js | types/index.js | /**
* @typedef {Object} TranscriptBlock A chunk of transcript
* @property {string} personName name of the person who spoke
* @property {string} timestamp ISO timestamp of when the words were spoken
* @property {string} transcriptText actual transcript text
*/
/**
* @typedef {Object} ChatMessage A chat message
*... | javascript | MIT | 5cd4c66fb4edf638f337542b4372d08db2af4cd9 | 2026-01-05T03:44:17.677518Z | false |
danistefanovic/react-lazy-hero | https://github.com/danistefanovic/react-lazy-hero/blob/5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78/src/index.js | src/index.js | import LazyHero from './LazyHero';
export default LazyHero;
| javascript | MIT | 5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78 | 2026-01-05T03:44:19.550859Z | false |
danistefanovic/react-lazy-hero | https://github.com/danistefanovic/react-lazy-hero/blob/5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78/src/LazyHero.js | src/LazyHero.js | import Color from 'color';
import inViewport from 'in-viewport';
import PropTypes from 'prop-types';
// React is a peer dependency
// eslint-disable-next-line import/no-unresolved, import/extensions
import React, { Component } from 'react';
// styled-components is a peer dependency
// eslint-disable-next-line import/no... | javascript | MIT | 5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78 | 2026-01-05T03:44:19.550859Z | false |
danistefanovic/react-lazy-hero | https://github.com/danistefanovic/react-lazy-hero/blob/5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78/src/utils.js | src/utils.js | /*
* Clamp a value between two other values
* @param {number} number
* @param {number} min
* @param {number} max
* @return {number}
*/
export function clamp(number, min = 0, max = 1) {
return Math.min(Math.max(number, min), max);
}
/*
* Get the percentage scrolled over an element
* @param {HTMLElement} ele... | javascript | MIT | 5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78 | 2026-01-05T03:44:19.550859Z | false |
danistefanovic/react-lazy-hero | https://github.com/danistefanovic/react-lazy-hero/blob/5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78/website/src/index.js | website/src/index.js | import React from 'react';
import ReactDOM from 'react-dom';
import ReactGA from 'react-ga';
import App from './components/App';
import './index.css';
ReactGA.initialize('UA-103011834-2');
ReactGA.set({ page: window.location.pathname });
ReactGA.pageview(window.location.pathname);
ReactDOM.render(<App />, document.ge... | javascript | MIT | 5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78 | 2026-01-05T03:44:19.550859Z | false |
danistefanovic/react-lazy-hero | https://github.com/danistefanovic/react-lazy-hero/blob/5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78/website/src/components/Logo.js | website/src/components/Logo.js | import React from 'react';
import styled from 'styled-components';
const Root = styled.h1`
background-color: #19B5FE;
border-radius: 3px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
color: #fff;
letter-spacing: 1px;
margin: 0;
text-align: center;
transform:... | javascript | MIT | 5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78 | 2026-01-05T03:44:19.550859Z | false |
danistefanovic/react-lazy-hero | https://github.com/danistefanovic/react-lazy-hero/blob/5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78/website/src/components/Knobs.js | website/src/components/Knobs.js | /* eslint-disable react/prop-types */
import React from 'react';
import styled from 'styled-components';
const Root = styled.div`
overflow: scroll;
`;
const Table = styled.table`
border-spacing: 0;
border-collapse: collapse;
font-size: 0.8rem;
margin: 10px auto 45px;
text-align: left;
max... | javascript | MIT | 5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78 | 2026-01-05T03:44:19.550859Z | false |
danistefanovic/react-lazy-hero | https://github.com/danistefanovic/react-lazy-hero/blob/5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78/website/src/components/MenuBar.js | website/src/components/MenuBar.js | import React from 'react';
import PropTypes from 'prop-types';
import { compose, withHandlers, withState } from 'recompose';
import styled from 'styled-components';
import Container from './Container';
import GithubButton from './GithubButton';
import Knobs from './Knobs';
const githubButtonHeight = '35px';
const Ro... | javascript | MIT | 5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78 | 2026-01-05T03:44:19.550859Z | false |
danistefanovic/react-lazy-hero | https://github.com/danistefanovic/react-lazy-hero/blob/5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78/website/src/components/GithubButton.js | website/src/components/GithubButton.js | import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
const Root = styled.div`
position: relative;
top: 3px;
height: 35px;
> a {
opacity: 0;
}
`;
export default function GithubButton(props) {
return (
<Root style={props.style}>
... | javascript | MIT | 5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78 | 2026-01-05T03:44:19.550859Z | false |
danistefanovic/react-lazy-hero | https://github.com/danistefanovic/react-lazy-hero/blob/5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78/website/src/components/Container.js | website/src/components/Container.js | import styled from 'styled-components';
const Container = styled.div`
margin: 0 auto;
max-width: 520px;
`;
export default Container;
| javascript | MIT | 5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78 | 2026-01-05T03:44:19.550859Z | false |
danistefanovic/react-lazy-hero | https://github.com/danistefanovic/react-lazy-hero/blob/5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78/website/src/components/App.js | website/src/components/App.js | import React from 'react';
import LazyHero from 'react-lazy-hero';
import PropTypes from 'prop-types';
import {
compose, pure, withHandlers, withState,
} from 'recompose';
import heroImage from '../mountains.jpg';
import Footer from './Footer';
import Logo from './Logo';
import MainContent from './MainContent';
im... | javascript | MIT | 5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78 | 2026-01-05T03:44:19.550859Z | false |
danistefanovic/react-lazy-hero | https://github.com/danistefanovic/react-lazy-hero/blob/5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78/website/src/components/Footer.js | website/src/components/Footer.js | import React from 'react';
import styled from 'styled-components';
import Container from './Container';
const Root = styled.footer`
margin: 0 0 6rem;
text-align: center;
`;
const Link = styled.a`
color: #aaa;
font-size: 0.8rem;
text-decoration: none;
white-space: nowrap;
&:hover {
... | javascript | MIT | 5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78 | 2026-01-05T03:44:19.550859Z | false |
danistefanovic/react-lazy-hero | https://github.com/danistefanovic/react-lazy-hero/blob/5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78/website/src/components/MainContent.js | website/src/components/MainContent.js | import React from 'react';
import styled from 'styled-components';
// eslint-disable-next-line import/no-webpack-loader-syntax, import/no-unresolved
import gettingStarted from '!markdown-with-front-matter-loader!../GettingStarted.md';
import Container from './Container';
// eslint-disable-next-line no-underscore-dang... | javascript | MIT | 5d6080a7ebb5f571a74a96a3f51c40d2c9e31f78 | 2026-01-05T03:44:19.550859Z | false |
lang-ai/react-emails | https://github.com/lang-ai/react-emails/blob/bb2b2f575f905263bf1801330148c12d248a2555/src/index.js | src/index.js | import React from 'react';
import ReactDOM from 'react-dom';
import Email from './Email';
import './inlined.css';
/**
* This file is not used when rendering the email on the server.
* It's the perfect place to include mock data for development.
*/
const mockData = {
city: 'Madrid',
weather: [
{
"da... | javascript | MIT | bb2b2f575f905263bf1801330148c12d248a2555 | 2026-01-05T03:44:41.113772Z | false |
lang-ai/react-emails | https://github.com/lang-ai/react-emails/blob/bb2b2f575f905263bf1801330148c12d248a2555/src/Email.js | src/Email.js | import React from 'react';
import Grid from './layout/Grid';
import Header from './elements/Header';
import Title from './elements/Title';
import Body from './elements/Body';
import Weather from './elements/Weather';
import Footer from './elements/Footer';
const style = {
container: {
backgroundColor: '#efefef... | javascript | MIT | bb2b2f575f905263bf1801330148c12d248a2555 | 2026-01-05T03:44:41.113772Z | false |
lang-ai/react-emails | https://github.com/lang-ai/react-emails/blob/bb2b2f575f905263bf1801330148c12d248a2555/src/elements/Title.js | src/elements/Title.js | import React from 'react';
import Grid from '../layout/Grid';
const style = {
wrapper: {
width: 'auto',
margin: '0 auto',
},
title: {
fontSize: '24px',
fontWeight: 'bold',
marginTop: '5px',
marginBottom: '10px',
},
};
function Title({ children }) {
return (
<Grid style={style... | javascript | MIT | bb2b2f575f905263bf1801330148c12d248a2555 | 2026-01-05T03:44:41.113772Z | false |
lang-ai/react-emails | https://github.com/lang-ai/react-emails/blob/bb2b2f575f905263bf1801330148c12d248a2555/src/elements/Body.js | src/elements/Body.js | import React from 'react';
import Grid from '../layout/Grid';
const style = {
content: {
backgroundColor: 'white',
padding: '20px',
},
};
function Body({ children }) {
return (
<Grid>
<Grid.Cell style={style.content}>
{children}
</Grid.Cell>
</Grid>
);
}
export default ... | javascript | MIT | bb2b2f575f905263bf1801330148c12d248a2555 | 2026-01-05T03:44:41.113772Z | false |
lang-ai/react-emails | https://github.com/lang-ai/react-emails/blob/bb2b2f575f905263bf1801330148c12d248a2555/src/elements/Footer.js | src/elements/Footer.js | import React from 'react';
import Grid from '../layout/Grid';
const style = {
footer: {
margin: '20px 0',
},
p: {
fontSize: '14px',
lineHeight: '1.5',
margin: 0,
color: '#607D8B',
textAlign: 'center',
},
a: {
color: '#00a1ef',
},
};
function Footer() {
return (
<Grid... | javascript | MIT | bb2b2f575f905263bf1801330148c12d248a2555 | 2026-01-05T03:44:41.113772Z | false |
lang-ai/react-emails | https://github.com/lang-ai/react-emails/blob/bb2b2f575f905263bf1801330148c12d248a2555/src/elements/Header.js | src/elements/Header.js | import React from 'react';
import Grid from '../layout/Grid';
import Img from './Img';
const logoSrc = 'https://s3-eu-west-1.amazonaws.com/sentisis-images/github_public/react-emails/logo.png';
const style = {
header: {
margin: '10px auto 20px auto',
width: 'auto',
},
img: {
height: '35px',
},
... | javascript | MIT | bb2b2f575f905263bf1801330148c12d248a2555 | 2026-01-05T03:44:41.113772Z | false |
lang-ai/react-emails | https://github.com/lang-ai/react-emails/blob/bb2b2f575f905263bf1801330148c12d248a2555/src/elements/Weather.js | src/elements/Weather.js | import React from 'react';
import format from 'date-fns/format';
import Grid from '../layout/Grid';
import Img from './Img';
const style = {
container: {
color: '#333',
},
todayContainer: {
width: 'auto',
margin: '0 auto',
},
todayBody: {
marginLeft: '20px',
},
todayName: {
fontS... | javascript | MIT | bb2b2f575f905263bf1801330148c12d248a2555 | 2026-01-05T03:44:41.113772Z | false |
lang-ai/react-emails | https://github.com/lang-ai/react-emails/blob/bb2b2f575f905263bf1801330148c12d248a2555/src/elements/Img.js | src/elements/Img.js | import React from 'react';
const imgStyle = {
img: {
outline: 'none',
textDecoration: 'none',
border: 'none',
display: 'block',
},
};
function Img({ src, alt, className, style = {} }) {
return (
<img
src={src}
alt={alt}
style={{ ...imgStyle.img, ...style }}
classNam... | javascript | MIT | bb2b2f575f905263bf1801330148c12d248a2555 | 2026-01-05T03:44:41.113772Z | false |
lang-ai/react-emails | https://github.com/lang-ai/react-emails/blob/bb2b2f575f905263bf1801330148c12d248a2555/src/layout/Grid.js | src/layout/Grid.js | import React from 'react';
/**
* This grid allows you to be less verbose by only defining whay you need:
*
* <Grid>
* <Grid.Row>
* <Grid.Cell>
* <p>Foo</p>
* </Grid.Cell>
* </Grid.Row>
* </Grid>
*
* Is equivalent of:
*
* <Grid>
* <p>Foo</p>
* </Grid>
*
... | javascript | MIT | bb2b2f575f905263bf1801330148c12d248a2555 | 2026-01-05T03:44:41.113772Z | false |
lang-ai/react-emails | https://github.com/lang-ai/react-emails/blob/bb2b2f575f905263bf1801330148c12d248a2555/example/weather.js | example/weather.js | const fs = require('fs');
const fetch = require('node-fetch');
/**
* You can also install the package as a module and require it.
*
* For example in our production server, we have a repository with all the
* emails layouts created with this same tecnique.
* The package name is `@sentisis/emails` and then we simp... | javascript | MIT | bb2b2f575f905263bf1801330148c12d248a2555 | 2026-01-05T03:44:41.113772Z | false |
lang-ai/react-emails | https://github.com/lang-ai/react-emails/blob/bb2b2f575f905263bf1801330148c12d248a2555/server/createEmail.js | server/createEmail.js | const fs = require('fs');
const Path = require('path');
const React = require('react');
const ReactDOMServer = require('react-dom/server');
const Email = require('../lib/Email').default;
const STYLE_TAG = '%STYLE%';
const CONTENT_TAG = '%CONTENT%';
/**
* Get the file from a relative path
* @param {String} relativ... | javascript | MIT | bb2b2f575f905263bf1801330148c12d248a2555 | 2026-01-05T03:44:41.113772Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/base.js | static/js/base.js | AOS.init({
duration: 1000,
once: true
});
const byId = id => {
return document.getElementById(id);
}
window.onclick = function(event) {
if (event.target.matches(".open")) {
byId("sidenav").classList.toggle("show");
} else if (!(event.target.matches(".no-remove"))) {
byId("sidenav")... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/index.js | static/js/index.js | const minDelay = 700;
const maxDelay = 900;
const minLetters = 10;
const maxLetters = 18;
const delay = 75;
const startAscii = 65;
const endAscii = 91;
const title = {
"first-header": "SORT",
"second-header": "VISUALIZER"
};
byId("header").onclick = headerAnimation;
headerAnimation();
function oneHeaderAn... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/base_sort.js | static/js/base_sort.js | const SHUFFLE_DELAY = 2000;
const SORT_DELAY = 5000;
const RED = "element-red";
const BLUE = "element-blue";
const GREEN = "element-green";
const NOTE_DURATION = 50;
const FREQ_MIN = 200;
const FREQ_MAX = 600;
const VOLUME = 0.005;
var elements = [];
var running = false;
const audioCtx = new(window.AudioContext || wind... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/gnomesort.js | static/js/sorts/gnomesort.js | async function run() {
runBtn(gnomeSort, elements);
}
async function gnomeSort(elements) {
let i = 1;
let j = 2;
while (i < elements.length) {
if (!running) return;
if (!compare(i-1, i)) {
i = j;
j++;
} else {
await swap(i-1, i);
... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/quicksort.js | static/js/sorts/quicksort.js | async function run() {
runBtn(quickSort, elements, 0, elements.length-1)
}
async function quickSort(array, left, right) {
if (left < right) {
let pivot = left;
changeColor(pivot, RED);
let i = left;
let j = right;
changeColor(j, BLUE);
while (i < j) {
if (... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/selectionsort.js | static/js/sorts/selectionsort.js | async function run() {
runBtn(selectionSort, elements);
}
async function selectionSort(elements) {
for (let i = 0; i < elements.length; i++) {
let min = i;
for (let j = i; j < elements.length; j++) {
if (!running) return;
if (!compare(j, min)) {
min = j;
... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/shakersort.js | static/js/sorts/shakersort.js | async function run() {
runBtn(shakerSort, elements);
}
async function shakerSort(nums) {
let is_Sorted = true;
while (is_Sorted) {
for (let i = 0; i< nums.length - 1; i++) {
if (!running) return;
if (compare(i, i+1)) {
await swap(i, i+1);
is_... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/bubblesort.js | static/js/sorts/bubblesort.js | async function run() {
runBtn(bubbleSort, elements);
}
async function bubbleSort(array) {
for (let i = 1; i < array.length; i++) {
for (let j = 0; j < array.length-i; j++) {
if (!running) return;
if (compare(j, j+1)) {
await swap(j, j+1);
}
}
... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/pancakesort.js | static/js/sorts/pancakesort.js | async function run() {
runBtn(pancakeSort, elements);
}
async function flip(arr, k) {
let left = 0;
while (left < k) {
if (!running) return;
await swap(left, k);
k--;
left++;
}
}
function max_index(arr, k) {
let index = 0;
for (let i = 0; i < k; i++) {
i... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/bitonicsort.js | static/js/sorts/bitonicsort.js | window.addEventListener("load", () => {
let slider = document.getElementById("slider");
slider.parentNode.removeChild(slider);
let container = document.getElementsByClassName("slider-container")[0];
container.innerHTML += '<input type="range" value="6" min="4" max="10" step="1" name="item-num" id="slide... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/oddevensort.js | static/js/sorts/oddevensort.js | async function run() {
runBtn(oddEvenSort, elements);
}
async function oddEvenSort(list) {
var sorted = false;
while (!sorted) {
sorted = true;
for (var i = 1; i < list.length - 1; i += 2) {
if (!running) return;
if (compare(i, i+1)) {
await swap(i, i + 1);
sorted = false;... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/combsort.js | static/js/sorts/combsort.js | async function run() {
runBtn(combSort, elements);
}
async function combSort(data) {
let length = data.length;
let shrink = 1.3;
let gap = length;
let sorted = false;
while (!sorted) {
if (!running) return;
gap = parseInt(gap/shrink);
if (gap <= 1) {
sorted ... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/radixsort.js | static/js/sorts/radixsort.js | async function run() {
runBtn(radixBucketSort, elements);
}
async function radixBucketSort (arr) {
let delay = SORT_DELAY / elements.length;
var idx1, idx2, idx3, len1, len2, radix, radixKey;
var radices = {}, buckets = {}, num, curr;
var currLen, radixStr, currBucket;
len1 = arr.length;
l... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/bogosort.js | static/js/sorts/bogosort.js | async function run() {
runBtn(bogoSort, elements);
}
async function bogoSort(arr) {
while (!isSorted(arr)) {
if (!running) return;
await shuffleBogo(arr);
}
}
async function shuffleBogo(arr) {
for (let i = 0; i < elements.length; i++) {
let rand_index = Math.floor(Math.random()... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/insertionsort.js | static/js/sorts/insertionsort.js | async function run() {
runBtn(insertionSort, elements);
}
async function insertionSort(elements) {
for (let i = 1; i < elements.length; i++) {
if (!running) return;
let j = i;
while (j > 0 && !compare(j, j-1)) {
if (!running) return;
await swap(j, j-1);
... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/heapsort.js | static/js/sorts/heapsort.js | async function run() {
runBtn(heapSort, elements);
}
async function heapify(elements, length, i) {
if (!running) return;
let largest = i;
let left = i * 2 + 1;
let right = left + 1;
if (left < length && compare(left, largest)) {
largest = left;
}
if (right < length && compare(... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/shellsort.js | static/js/sorts/shellsort.js | async function run() {
runBtn(shellSort, elements);
}
async function shellSort(arr) {
let delay = SORT_DELAY / elements.length;
let n = arr.length;
let interval = ~~(n / 2);
let j;
while (interval > 0) {
for (let i = interval; i < n; i++) {
if (!running) return;
... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/customsort.js | static/js/sorts/customsort.js | class SortError extends Error {
constructor(...params) {
super(...params)
if (Error.captureStackTrace) {
Error.captureStackTrace(this, SortError)
}
this.name = 'SortError'
}
}
let run = () => {
location.href = "#sort-cover";
};
let clicked = false;
let submitted = false;
CodeMirror.ke... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/sorts/mergesort.js | static/js/sorts/mergesort.js | async function run() {
runBtn(mergeSort, elements, 0, elements.length);
}
async function mergeSort(arr, start, end) {
if (start >= end - 1) return;
var mid = start + ~~((end - start) / 2);
await mergeSort(arr, start, mid);
await mergeSort(arr, mid, end);
var cache = Array(end - start).fill(arr[0]);
var... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/codemirror.js | static/js/others/codemirror.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
// This is CodeMirror (http://codemirror.net), a code editor
// implemented in JavaScript on top of the browser's DOM.
//
// You can find some technical background for some of the code below
/... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | true |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/closebrackets.js | static/js/others/closebrackets.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // ... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/matchbrackets.js | static/js/others/matchbrackets.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // ... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/fullscreen.js | static/js/others/fullscreen.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // ... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/highlight.js | static/js/others/highlight.js | /*
Highlight.js 10.7.1 (421b23b0)
License: BSD-3-Clause
Copyright (c) 2006-2021, Ivan Sagalaev
*/
var hljs=function(){"use strict";function e(t){
return t instanceof Map?t.clear=t.delete=t.set=()=>{
throw Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=()=>{
throw Error("set is read-only")
})... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | true |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/comment.js | static/js/others/comment.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // ... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/meta.js | static/js/others/mode/meta.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/django/django.js | static/js/others/mode/django/django.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"),
require("../../... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/soy/test.js | static/js/others/mode/soy/test.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 2}, "soy");
function MT(name) {test.mode(name, mode, Array.prototype.slice.call(arguments, 1));}
// Test of small keywords and ... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/soy/soy.js | static/js/others/mode/soy/soy.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"));
else if (typeof defi... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/vhdl/vhdl.js | static/js/others/mode/vhdl/vhdl.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
// Originally written by Alf Nielsen, re-written by Michael Zhou
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemir... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/elm/elm.js | static/js/others/mode/elm/elm.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // A... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/turtle/turtle.js | static/js/others/mode/turtle/turtle.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // ... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/sas/sas.js | static/js/others/mode/sas/sas.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
// SAS mode copyright (c) 2016 Jared Dean, SAS Institute
// Created by Jared Dean
// TODO
// indent and de-indent
// identify macro variables
//Definitions
// comment -- text within * ; ... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/python/python.js | static/js/others/mode/python/python.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // ... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/python/test.js | static/js/others/mode/python/test.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({indentUnit: 4},
{name: "python",
version: 3,
singleLineStringErrors: false});
function MT(name) { ... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/julia/julia.js | static/js/others/mode/julia/julia.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // ... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/stex/stex.js | static/js/others/mode/stex/stex.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
/*
* Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de)
* Licence: MIT
*/
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/stex/test.js | static/js/others/mode/stex/test.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function() {
var mode = CodeMirror.getMode({tabSize: 4}, "stex");
function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
MT("word",
"foo");
MT(... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/q/q.js | static/js/others/mode/q/q.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // ... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/haskell-literate/haskell-literate.js | static/js/others/mode/haskell-literate/haskell-literate.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
(function (mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), require("../haskell/haskell"))
else if (typeof define =... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Myphz/sortvisualizer | https://github.com/Myphz/sortvisualizer/blob/14191645ff254489a5c03689708989bc498e2d69/static/js/others/mode/nsis/nsis.js | static/js/others/mode/nsis/nsis.js | // CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: https://codemirror.net/LICENSE
// Author: Jan T. Sott (http://github.com/idleberg)
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"), requi... | javascript | MIT | 14191645ff254489a5c03689708989bc498e2d69 | 2026-01-05T03:44:40.185717Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.