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 |
|---|---|---|---|---|---|---|---|---|
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/util/useTranslation.js | src/util/useTranslation.js | import { useLocalization } from "./LocalizationContext";
import translationsEn from "../locales/en.json";
import translationsEs from "../locales/es.json";
import translationsSe from "../locales/se.json";
export const useTranslation = () => {
const { language, setLanguage } = useLocalization();
const translat... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/util/wrongAnswerReasons.js | src/util/wrongAnswerReasons.js | const { Enumify } = require("./enumify");
class WrongAnswerReasons extends Enumify {
static wrong = new WrongAnswerReasons();
static sameAsProblem = new WrongAnswerReasons();
static errored = new WrongAnswerReasons();
static _ = this.closeEnum();
}
export default WrongAnswerReasons
| javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/util/withTranslation.js | src/util/withTranslation.js | import React from 'react';
import { useTranslation } from './useTranslation';
const withTranslation = (WrappedComponent) => {
return (props) => {
const { translate, setLanguage } = useTranslation();
return <WrappedComponent translate={translate} setLanguage={setLanguage} {...props} />;
};
};
export defaul... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/util/parseMatrixTex.js | src/util/parseMatrixTex.js | export function parseMatrixTex(solTex) {
const solutionMatrices = []
;(Array.isArray(solTex) ? solTex : [solTex]).forEach(sol => {
const _start = sol.indexOf("matrix} ") + "matrix} ".length
const _end = sol.indexOf("\\end{")
let _solutionMatrix = sol
.substring(_start, _end)... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/util/calculateSemester.js | src/util/calculateSemester.js | const { SESSION_SYSTEM } = require('@common/global-config')
const calculateSemester = (ms) => {
const date = new Date(ms)
const semesters = [
{
name: "Fall",
start: 70,
end: 100
},
{
name: "Spring",
start: 0,
end: 4... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/util/toastIds.js | src/util/toastIds.js | const { Enumify } = require("./enumify");
class ToastID extends Enumify {
static expired_session = new ToastID();
static not_authorized = new ToastID();
static set_lesson_unknown_error = new ToastID();
static set_lesson_duplicate_error = new ToastID();
static set_lesson_success = new ToastID();
... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/util/daysSinceEpoch.js | src/util/daysSinceEpoch.js | export default function daysSinceEpoch(){
return Math.floor(Date.now() / (1000 * 60 * 60 * 24))
}
| javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/util/LocalizationContext.js | src/util/LocalizationContext.js | import React, { createContext, useState, useContext, useEffect } from 'react';
const LocalizationContext = createContext();
export const LocalizationProvider = ({ children }) => {
const [language, setLanguage] = useState(() => {
const hashParams = new URLSearchParams(window.location.hash.split('?')[1]);
con... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/util/parseJWT.js | src/util/parseJWT.js | function parseJwt(token) {
const base64Url = token.split('.')[1];
const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/');
const jsonPayload = decodeURIComponent(atob(base64).split('').map(function (c) {
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
}).join(''));
retu... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/util/getBuildType.js | src/util/getBuildType.js | const buildType = process.env.REACT_APP_BUILD_TYPE || ""
console.debug(`This has the build type: ${buildType}`)
const IS_STAGING = buildType.includes("staging")
const IS_STAGING_CONTENT = buildType === "staging-content"
const IS_STAGING_PLATFORM = buildType === "staging-platform"
const IS_PRODUCTION = buildType.incl... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/tools/readJsExportedObject.js | src/tools/readJsExportedObject.js | const tempy = require("tempy-legacy");
const readFile = require("fs/promises").readFile;
const pathToFileURL = require("url").pathToFileURL;
async function readJsExportedObject(file) {
const objectFile = await readFile(file)
return await tempy.write.task(objectFile, async (temporaryPath) => {
return (a... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/tools/preprocessProblemPool.js | src/tools/preprocessProblemPool.js | const path = require("path");
const fs = require("fs");
const util = require('util');
const { CONTENT_SOURCE } = require('../../common/global-config')
const copyFile = util.promisify(fs.copyFile)
const readdir = util.promisify(fs.readdir)
const lstat = util.promisify(fs.lstat)
const writeFile = util.promisify(fs.write... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/tools/populateGoogleSheets.js | src/tools/populateGoogleSheets.js | require('dotenv').config({
path: './.env.local'
})
const fromEntries = require('object.fromentries');
const admin = require('firebase-admin');
const to = require('await-to-js').default;
const serviceAccount = require('./service-account-credentials.json');
const { GoogleSpreadsheet } = require("google-spreadsheet");... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/pages/AssignmentAlreadyLinked.js | src/pages/AssignmentAlreadyLinked.js | import React, { useContext } from "react";
import { findLessonById, _lessonPlansNoEditor, ThemeContext } from "../config/config";
import { AppBar, Box, Toolbar } from "@material-ui/core";
import Grid from "@material-ui/core/Grid";
import Divider from "@material-ui/core/Divider";
import BrandLogoNav from "@components/Br... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/pages/SessionExpired.js | src/pages/SessionExpired.js | import React from "react";
import { AppBar, Box, Toolbar } from "@material-ui/core";
import Grid from "@material-ui/core/Grid";
import Divider from "@material-ui/core/Divider";
import BrandLogoNav from "@components/BrandLogoNav";
import Spacer from "@components/Spacer";
const SessionExpired = () => {
return <>
... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/pages/AssignmentNotLinked.js | src/pages/AssignmentNotLinked.js | import React from "react";
import { AppBar, Box, Toolbar } from "@material-ui/core";
import Grid from "@material-ui/core/Grid";
import Divider from "@material-ui/core/Divider";
import BrandLogoNav from "@components/BrandLogoNav";
import Spacer from "@components/Spacer";
import { SITE_NAME } from "../config/config";
c... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/pages/Posts/CanvasAssignments.js | src/pages/Posts/CanvasAssignments.js | import React from "react";
import Spacer from "@components/Spacer";
import { useStyles } from "./Posts";
import { Link } from "react-router-dom";
import clsx from "clsx";
import ZoomImage from "@components/ZoomImage";
const CanvasAssignments = () => {
const classes = useStyles()
return <>
<h1>
... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/pages/Posts/Posts.js | src/pages/Posts/Posts.js | import { Link, Route, Switch, useRouteMatch } from "react-router-dom";
import React, { useState } from "react";
import { AppBar, Box, Button, makeStyles, Menu, MenuItem, Toolbar } from "@material-ui/core";
import Grid from "@material-ui/core/Grid";
import BrandLogoNav from "@components/BrandLogoNav";
import { SITE_NAME... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/pages/Posts/SetUpCanvasIntegration.js | src/pages/Posts/SetUpCanvasIntegration.js | import React, { useState } from "react";
import Spacer from "@components/Spacer";
import { useStyles } from "./Posts";
import clsx from "clsx";
import ZoomImage from "@components/ZoomImage";
import { SITE_NAME } from "../../config/config";
const createCourseLink = "https://community.canvaslms.com/t5/Instructor-Guide/H... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/pages/Posts/About.js | src/pages/Posts/About.js | import React from "react";
import Spacer from "@components/Spacer";
import { useStyles } from "./Posts";
import { HELP_DOCUMENT, SITE_NAME } from "../../config/config";
const VPAT_LINK = `${process.env.PUBLIC_URL}/static/documents/OATutor_Sec508_WCAG.pdf`
const About = () => {
const classes = useStyles()
cons... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/pages/Posts/HowToUse.js | src/pages/Posts/HowToUse.js | import React from "react";
import Spacer from "@components/Spacer";
import { useStyles } from "./Posts";
import { HELP_DOCUMENT, SITE_NAME } from "../../config/config";
const VPAT_LINK = `${process.env.PUBLIC_URL}/static/documents/OATutor_Sec508_WCAG.pdf`
const HowToUse = () => {
const classes = useStyles()
... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/ZoomImage.js | src/components/ZoomImage.js | import React from 'react'
import Zoom from 'react-medium-image-zoom'
import 'react-medium-image-zoom/dist/styles.css'
/**
* @param {Partial<HTMLImageElement>} props
*/
const ZoomImage = (props) => {
return <>
<Zoom zoomMargin={40}>
<img {...props} alt={props.alt}/>
</Zoom>
</>
}
... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/BrandLogoNav.js | src/components/BrandLogoNav.js | import React, { useContext } from "react";
import { SITE_NAME, SITE_VERSION, ThemeContext } from "../config/config";
import { useHistory } from "react-router-dom";
import { makeStyles } from "@material-ui/core";
const useStyles = makeStyles({
"siteNavLink": {
textAlign: 'left',
paddingTop: "3px",
... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/NotFound.js | src/components/NotFound.js | import React from "react";
const NotFound = () => <h1>Not found</h1>;
export default NotFound;
| javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/BuildTimeIndicator.js | src/components/BuildTimeIndicator.js | export default function BuildTimeIndicator (props) {
const buildTime = +process.env.REACT_APP_BUILD_TIMESTAMP
if (isNaN(buildTime)) {
return <></>
}
return <h4>
(Built on: {new Date(buildTime).toUTCString()})
</h4>
}
| javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/GlobalErrorBoundary.js | src/components/GlobalErrorBoundary.js | import React from 'react';
import { ThemeContext } from "../config/config";
import ErrorBoundary from "./ErrorBoundary";
export default class GlobalErrorBoundary extends ErrorBoundary {
static contextType = ThemeContext;
constructor(props, context) {
super(props, context);
this.componentName =... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/TabFocusTrackerWrapper.js | src/components/TabFocusTrackerWrapper.js | import React from "react";
import { ThemeContext } from "../config/config";
import TabFocusTracker from "./TabFocusTracker";
export default class TabFocusTrackerWrapper extends React.Component {
static contextType = ThemeContext;
render() {
return <TabFocusTracker context={this.context}/>
}
}
| javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/RenderMedia.js | src/components/RenderMedia.js | import React from "react"
import ZoomImage from "./ZoomImage";
const REGEX_YOUTUBE = /^((?:https?:)?\/\/)?((?:www|m)\.)?(youtube(-nocookie)?\.com|youtu.be)(\/(?:[\w-]+\?v=|embed\/|v\/)?)([\w-]+)(\S+)?$/
export default class RenderMedia extends React.Component {
render() {
const url = this.props.url?.toStr... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/ErrorBoundary.js | src/components/ErrorBoundary.js | import React from 'react';
import { ThemeContext } from "../config/config";
export default class ErrorBoundary extends React.Component {
static contextType = ThemeContext;
constructor(props, context) {
super(props);
this.state = { hasError: false };
this.context = context
}
st... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/Spacer.js | src/components/Spacer.js | import React from "react";
const Spacer = ({ width = 24, height = 24, }) => {
return <div style={{width, height}}/>
}
export default Spacer
| javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/Firebase.js | src/components/Firebase.js | import {
CURRENT_SEMESTER,
DO_LOG_DATA,
DO_LOG_MOUSE_DATA,
ENABLE_FIREBASE,
GRANULARITY,
MAX_BUFFER_SIZE,
} from "../config/config.js";
import { initializeApp } from "firebase/app";
import {
arrayUnion,
doc,
getFirestore,
serverTimestamp,
setDoc,
} from "firebase/firestore";... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/TabFocusTracker.js | src/components/TabFocusTracker.js | import { useEffect } from "react";
import useWindowFocus from "use-window-focus";
import { useLocation } from 'react-router-dom';
export default function TabFocusTracker(props) {
const { context } = props
const { firebase } = context
const windowFocused = useWindowFocus();
const pathname = useLocation(... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/Popup/popup-styles.js | src/components/Popup/popup-styles.js | export const popupStyles = {
popupContent: {
background: '#FFF',
padding: '0px 30px 30px 30px',
borderRadius: '8px',
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
width: '1080px',
maxWidth: '95vw',
... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/Popup/Popup.js | src/components/Popup/Popup.js | import React from "react";
import Modal from "@material-ui/core/Modal";
import Box from "@material-ui/core/Box";
import IconButton from '@material-ui/core/IconButton';
import CloseRoundedIcon from '@material-ui/icons/CloseRounded';
import { withStyles } from "@material-ui/core/styles";
import { popupStyles } from "./po... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-input/GridInput.js | src/components/problem-input/GridInput.js | import React, { createRef } from "react";
import './GridInput.css'
import Button from "@material-ui/core/Button";
import clsx from 'clsx';
import EquationEditor from "equation-editor-react";
import { Box, ClickAwayListener, Grow, Paper, Popper, TextField } from "@material-ui/core";
import CloseIcon from '@material-ui/i... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-input/MatrixInput.js | src/components/problem-input/MatrixInput.js | import React from "react";
import GridInput from "./GridInput";
class MatrixInput extends React.Component {
// "$$\begin{bmatrix} -840 & 650 & -530 \\ 330 & 360 & 250 \\ -10 & 900 & 110 \end{bmatrix}$$"
render() {
return (
<GridInput {...this.props} isMatrix={true}/>
)
}
}
ex... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-input/MultipleChoice.js | src/components/problem-input/MultipleChoice.js | import React from 'react';
import Radio from '@material-ui/core/Radio';
import RadioGroup from '@material-ui/core/RadioGroup';
import FormControlLabel from '@material-ui/core/FormControlLabel';
import FormControl from '@material-ui/core/FormControl';
import { renderText } from '../../platform-logic/renderText.js';
impo... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-input/ProblemInput.js | src/components/problem-input/ProblemInput.js | import React, { createRef } from "react";
import Grid from "@material-ui/core/Grid";
import TextField from "@material-ui/core/TextField";
import MultipleChoice from "./MultipleChoice";
import GridInput from "./GridInput";
import MatrixInput from "./MatrixInput";
import { renderText } from "../../platform-logic/renderTe... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/ReloadIcon.js | src/components/problem-layout/ReloadIcon.js | import React from 'react';
import Tooltip from '@material-ui/core/Tooltip';
import IconButton from '@material-ui/core/IconButton';
// This reload icon is used to regenerate ChatGPT generated hints
const ReloadIconButton = ({ onClick }) => (
<Tooltip title="Regenerate Hint">
<IconButton onClick={onClick} ar... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/HintSystem.js | src/components/problem-layout/HintSystem.js | import React from "react";
import { withStyles } from "@material-ui/core/styles";
import Accordion from "@material-ui/core/Accordion";
import AccordionSummary from "@material-ui/core/AccordionSummary";
import AccordionDetails from "@material-ui/core/AccordionDetails";
import Typography from "@material-ui/core/Typograph... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/ProblemCard.js | src/components/problem-layout/ProblemCard.js | import React from "react";
import Card from "@material-ui/core/Card";
import CardActions from "@material-ui/core/CardActions";
import CardContent from "@material-ui/core/CardContent";
import Grid from "@material-ui/core/Grid";
import Button from "@material-ui/core/Button";
import IconButton from "@material-ui/core/Ico... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | true |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/ViewAllProblems.js | src/components/problem-layout/ViewAllProblems.js | import React, {
useEffect,
useState,
useMemo,
useContext,
} from 'react';
import { useParams } from 'react-router-dom';
import {
AppBar,
Toolbar,
Container,
Grid,
IconButton,
Box,
Typography,
makeStyles,
} from '@material-ui/core';
import HelpOutlineOutlinedIcon from '@material-ui/icons/HelpOutl... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/LessonSelection.js | src/components/problem-layout/LessonSelection.js | import React, { Fragment } from 'react';
import Grid from '@material-ui/core/Grid';
import Box from '@material-ui/core/Box';
import Button from '@material-ui/core/Button';
import Divider from '@material-ui/core/Divider';
import Paper from '@material-ui/core/Paper';
import { withStyles } from '@material-ui/core/styles';... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/DynamicHintHelper.js | src/components/problem-layout/DynamicHintHelper.js | import { renderGPTText } from "../../platform-logic/renderText.js";
import AWS from "aws-sdk";
export async function fetchDynamicHint(
DYNAMIC_HINT_URL,
promptParameters,
onChunkReceived,
onSuccessfulCompletion,
onError,
problemID,
variabilization,
context
) {
try {
... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/HintTextbox.js | src/components/problem-layout/HintTextbox.js | import React from 'react';
import { withStyles } from '@material-ui/core/styles';
import styles from './common-styles.js';
import { checkAnswer } from '../../platform-logic/checkAnswer.js';
import Button from '@material-ui/core/Button';
import Grid from '@material-ui/core/Grid';
import IconButton from '@material-ui/cor... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/ProblemCardWrapper.js | src/components/problem-layout/ProblemCardWrapper.js | import React from 'react';
import { LocalizationConsumer } from '../../util/LocalizationContext';
import ProblemCard from './ProblemCard';
const ProblemCardWrapper = (props) => (
<LocalizationConsumer>
{({ setLanguage }) => <ProblemCard {...props} setLanguage={setLanguage} />}
</LocalizationConsumer>
);
expor... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/common-styles.js | src/components/problem-layout/common-styles.js | const styles = theme => ({
card: {
width: '65%',
marginLeft: 'auto',
marginRight: 'auto',
marginBottom: 20
},
hintCard: {
width: '40em',
marginLeft: 'auto',
marginRight: 'auto',
marginBottom: 20
},
bullet: {
display: 'inline-blo... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/Problem.js | src/components/problem-layout/Problem.js | import React from "react";
import { withStyles } from "@material-ui/core/styles";
import Button from "@material-ui/core/Button";
import Card from "@material-ui/core/Card";
import CardContent from "@material-ui/core/CardContent";
import ProblemCardWrapper from "./ProblemCardWrapper";
import Grid from "@material-ui/core/... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | true |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/LessonSelectionWrapper.js | src/components/problem-layout/LessonSelectionWrapper.js | import React from 'react';
import { LocalizationConsumer } from '../../util/LocalizationContext';
import LessonSelection from './LessonSelection';
const LessonSelectionWrapper = (props) => (
<LocalizationConsumer>
{({ setLanguage }) => <LessonSelection {...props} setLanguage={setLanguage} />}
</LocalizationCon... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/ProblemWrapper.js | src/components/problem-layout/ProblemWrapper.js | import React from 'react';
import { LocalizationConsumer } from '../../util/LocalizationContext';
import Problem from './Problem';
const ProblemWrapper = (props) => (
<LocalizationConsumer>
{({ setLanguage }) => <Problem {...props} setLanguage={setLanguage} />}
</LocalizationConsumer>
);
export default Proble... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/SubHintSystem.js | src/components/problem-layout/SubHintSystem.js | import React from 'react';
import { withStyles } from '@material-ui/core/styles';
import Accordion from '@material-ui/core/Accordion';
import AccordionSummary from '@material-ui/core/AccordionSummary';
import AccordionDetails from '@material-ui/core/AccordionDetails';
import Typography from '@material-ui/core/Typograph... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/components/problem-layout/ToastNotifyCorrectness.js | src/components/problem-layout/ToastNotifyCorrectness.js | import { toast } from "react-toastify";
import WrongAnswerReasons from "../../util/wrongAnswerReasons";
export function toastNotifyCorrectness(isCorrect, reason, translate) {
if (isCorrect) {
toast.success(translate("toast.correct"), {
autoClose: 3000
})
} else {
if (reason ... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/models/BKT/BKT-brain.js | src/models/BKT/BKT-brain.js | export default function update(model, isCorrect) {
let numerator;
let masteryAndGuess;
if (isCorrect) {
numerator = model.probMastery * (1 - model.probSlip);
masteryAndGuess = (1 - model.probMastery) * model.probGuess;
} else {
numerator = model.probMastery * model.probSlip;
... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/models/BKT/problem-select-heuristics/defaultHeuristic.js | src/models/BKT/problem-select-heuristics/defaultHeuristic.js | import {MASTERY_THRESHOLD} from "../../../config/config.js"
function heuristic(problems, completedProbs) {
var chosenProblem = [];
for (var problem of problems) {
// Already completed this problem or irrelevant (null if not in learning goals)
if (completedProbs.has(problem.id) || problem.probMastery == nu... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/models/BKT/problem-select-heuristics/experimentalHeuristic.js | src/models/BKT/problem-select-heuristics/experimentalHeuristic.js | import {MASTERY_THRESHOLD} from "../../../config/config.js"
function heuristic(problems, completedProbs) {
var chosenProblem = [];
for (var problem of problems) {
// Already completed this problem or irrelevant (null if not in learning goals)
if (completedProbs.has(problem.id) || problem.probMastery == nu... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/platform-logic/Platform.js | src/platform-logic/Platform.js | import React from "react";
import { AppBar, Toolbar } from "@material-ui/core";
import Grid from "@material-ui/core/Grid";
import ProblemWrapper from "@components/problem-layout/ProblemWrapper.js";
import LessonSelectionWrapper from "@components/problem-layout/LessonSelectionWrapper.js";
import { withRouter } from "rea... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/platform-logic/checkAnswer.js | src/platform-logic/checkAnswer.js | import { variabilize } from './variabilize.js';
import insert from "../util/strInsert";
import { parseMatrixTex } from "../util/parseMatrixTex";
import { IS_DEVELOPMENT, IS_STAGING_OR_DEVELOPMENT } from "../util/getBuildType";
import WrongAnswerReasons from "../util/wrongAnswerReasons";
const KAS = require('../kas.js'... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/platform-logic/renderText.js | src/platform-logic/renderText.js | import React from "react";
import { InlineMath } from "react-katex";
import { dynamicText } from "../config/config.js";
import { variabilize, chooseVariables } from "./variabilize.js";
import Spacer from "@components/Spacer";
import ErrorBoundary from "@components/ErrorBoundary";
import RenderMedia from "@components/Re... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/platform-logic/variabilize.js | src/platform-logic/variabilize.js | var gen = require('random-seed');
// Replace variables with their values in a string of text
function variabilize(text, variabilization) {
if (typeof variabilization === 'undefined' || Object.keys(variabilization).length === 0) {
return text;
}
Object.keys(variabilization).forEach(v => {
if... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/platform-logic/DebugPlatform.js | src/platform-logic/DebugPlatform.js | import React from 'react';
import { AppBar, Toolbar, Typography } from '@material-ui/core';
import Button from '@material-ui/core/Button';
import Grid from '@material-ui/core/Grid';
import ProblemWrapper from "@components/problem-layout/ProblemWrapper.js";
import { ThemeContext } from '../config/config.js';
import Box... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/platform-logic/bioInfo.js | src/platform-logic/bioInfo.js | import React, { Component } from "react";
import { AppBar, Toolbar } from "@material-ui/core";
import Grid from "@material-ui/core/Grid";
import BrandLogoNav from "@components/BrandLogoNav";
import "./bioInfo.css";
class BioInfo extends Component {
constructor(props) {
super(props);
this.state = {... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/config/firebaseConfig.js | src/config/firebaseConfig.js | const config = {
apiKey: "[apikey]",
authDomain: "[projId].firebaseapp.com",
databaseURL: "https://[projId].firebaseio.com",
projectId: "[projId]",
storageBucket: "[projId].appspot.com",
messagingSenderId: "[messagingSenderId]",
appId: "[appId]",
measurementId: "[measurementId]",
};
exp... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/src/config/config.js | src/config/config.js | import React from "react";
import courses from "../content-sources/oatutor/coursePlans.json";
import { calculateSemester } from "../util/calculateSemester.js";
import { SITE_NAME } from "@common/global-config";
import { cleanObjectKeys } from "../util/cleanObject";
const ThemeContext = React.createContext(0);
const S... | javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
CAHLR/OATutor | https://github.com/CAHLR/OATutor/blob/10a5baf153a505267af8045b05c217b4be6bd8b4/common/global-config.js | common/global-config.js | const SESSION_SYSTEM = "SEMESTER"
const SITE_NAME = "OATutor"
const CONTENT_SOURCE = "oatutor"
module.exports = {
SESSION_SYSTEM,
SITE_NAME,
CONTENT_SOURCE
}
| javascript | MIT | 10a5baf153a505267af8045b05c217b4be6bd8b4 | 2026-01-05T03:39:09.711315Z | false |
youhunwl/TVAPP | https://github.com/youhunwl/TVAPP/blob/aecf353f0f3261932f501a17a866d2cbe301541e/电视直播/酷9直播/webview双模式播放全攻略/webview_jscode.js | 电视直播/酷9直播/webview双模式播放全攻略/webview_jscode.js | (function () {
const startTime = Date.now();
let videoElement = null;
let controlsVisible = false;
let controlsTimeout = null;
// 移除默认控制条
function removeControls() {
const selectors = [
'#control_bar', '.controls',
'.vjs-control-bar', 'xg-controls',
'... | javascript | Apache-2.0 | aecf353f0f3261932f501a17a866d2cbe301541e | 2026-01-04T15:58:58.323523Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.