• 笙默考试管理系统-MyExamTest----codemirror(14)


    笙默考试管理系统-MyExamTest----codemirror(14

    目录

    一、 笙默考试管理系统-MyExamTest----codemirror

    二、 笙默考试管理系统-MyExamTest----codemirror

    三、 笙默考试管理系统-MyExamTest----codemirror

    四、 笙默考试管理系统-MyExamTest----codemirror

    五、 笙默考试管理系统-MyExamTest----codemirror

    • 笙默考试管理系统-MyExamTest----codemirror

     function fastPoll() {

                var missed = false;

                pollingFast = true;

                function p() {

                    startOperation();

                    var changed = readInput();

                    if (!changed && !missed) {missed = true; poll.set(60, p);}

                    else {pollingFast = false; slowPoll();}

                    endOperation();

                }

    • 笙默考试管理系统-MyExamTest----codemirror

                poll.set(20, p);

            }

            // Previnput is a hack to work with IME. If we reset the textarea

            // on every change, that breaks IME. So we look for changes

            // compared to the previous content instead. (Modern browsers have

            // events that indicate IME taking place, but these are not widely

            // supported or compatible enough yet to rely on.)

            var prevInput = "";

    • 笙默考试管理系统-MyExamTest----codemirror

            function readInput() {

                if (leaveInputAlone || !focused || hasSelection(input)) return false;

                var text = input.value;

                if (text == prevInput) return false;

                shiftSelecting = null;

                var same = 0, l = Math.min(prevInput.length, text.length);

                while (same < l && prevInput[same] == text[same]) ++same;

                if (same < prevInput.length)

    • 笙默考试管理系统-MyExamTest----codemirror

                    sel.from = {line: sel.from.line, ch: sel.from.ch - (prevInput.length - same)};

                else if (overwrite && posEq(sel.from, sel.to))

                    sel.to = {line: sel.to.line, ch: Math.min(getLine(sel.to.line).text.length, sel.to.ch + (text.length - same))};

                replaceSelection(text.slice(same), "end");

                prevInput = text;

                return true;

            }

    • 笙默考试管理系统-MyExamTest----codemirror

            function resetInput(user) {

                if (!posEq(sel.from, sel.to)) {

                    prevInput = "";

                    input.value = getSelection();

                    input.select();

                } else if (user) prevInput = input.value = "";

            }

  • 相关阅读:
    LLM.int8()——自适应混合精度量化方法
    Nginx 反向代理,负载均衡,动静分离和高可用 实操
    什么是Sectigo证书?
    docker部署ElasticSearch过程记录
    导入导出Excel
    y134.第七章 服务网格与治理-Istio从入门到精通 -- 授权策略(二十)
    springboot异常(一):springboot自定义全局异常处理
    大厂面试必备 - async/await 详解
    ajax笔记四
    mysql创建用户
  • 原文地址:https://blog.csdn.net/N201871643/article/details/132678295