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


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

    目录

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

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

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

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

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

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

    • 笙默考试管理系统-MyExamTest

     function setBookmark(pos) {

                pos = clipPos(pos);

                var bm = new Bookmark(pos.ch);

                getLine(pos.line).addMark(bm);

                return bm;

            }

            function addGutterMarker(line, text, className) {

                if (typeof line == "number") line = getLine(clipLine(line));

                line.gutterMarker = {text: text, style: className};

                gutterDirty = true;

                return line;

            }

    • 笙默考试管理系统-MyExamTest

            function removeGutterMarker(line) {

                if (typeof line == "number") line = getLine(clipLine(line));

                line.gutterMarker = null;

                gutterDirty = true;

            }

            function changeLine(handle, op) {

                var no = handle, line = handle;

                if (typeof handle == "number") line = getLine(clipLine(handle));

                else no = lineNo(handle);

                if (no == null) return null;

                if (op(line, no)) changes.push({from: no, to: no + 1});

                else return null;

                return line;

            }

    • 笙默考试管理系统-MyExamTest

            function setLineClass(handle, className) {

                return changeLine(handle, function(line) {

                    if (line.className != className) {

                        line.className = className;

                        return true;

                    }

                });

            }

    • 笙默考试管理系统-MyExamTest

            function setLineHidden(handle, hidden) {

                return changeLine(handle, function(line, no) {

                    if (line.hidden != hidden) {

                        line.hidden = hidden;

                        updateLineHeight(line, hidden ? 0 : 1);

                        if (hidden && (sel.from.line == no || sel.to.line == no))

                            setSelection(skipHidden(sel.from, sel.from.line, sel.from.ch),

                                skipHidden(sel.to, sel.to.line, sel.to.ch));

                        return (gutterDirty = true);

                    }

                });

            }

            function lineInfo(line) {

                if (typeof line == "number") {

                    if (!isLine(line)) return null;

                    var n = line;

                    line = getLine(line);

                    if (!line) return null;

                }

    • 笙默考试管理系统-MyExamTest

                else {

                    var n = lineNo(line);

                    if (n == null) return null;

                }

                var marker = line.gutterMarker;

                return {line: n, handle: line, text: line.text, markerText: marker && marker.text,

                    markerClass: marker && marker.style, lineClass: line.className};

            }

            function stringWidth(str) {

                measure.innerHTML = "

    x
    ";

                measure.firstChild.firstChild.firstChild.nodeValue = str;

                return measure.firstChild.firstChild.offsetWidth || 10;

            }

            // These are used to go from pixel positions to character

            // positions, taking varying character widths into account.

            function charFromX(line, x) {

                if (x <= 0) return 0;

                var lineObj = getLine(line), text = lineObj.text;

                function getX(len) {

                    measure.innerHTML = "

    " + lineObj.getHTML(null, null, false, tabText, len) + "
    ";

                    return measure.firstChild.firstChild.offsetWidth;

                }

                var from = 0, fromX = 0, to = text.length, toX;

                // Guess a suitable upper bound for our search.

                var estimated = Math.min(to, Math.ceil(x / charWidth()));

                for (;;) {

                    var estX = getX(estimated);

                    if (estX <= x && estimated < to) estimated = Math.min(to, Math.ceil(estimated * 1.2));

                    else {toX = estX; to = estimated; break;}

  • 相关阅读:
    AttributeError: 'NoneType' object has no attribute 'int4WeightExtractionHalf'
    【超实用】3 分钟,教你用 Docker 部署一个 Python 应用!
    [Python] ModuleNotFoundError: No module named ‘_ctypes‘
    250张png图片实现动画实现方案事件
    Python除法
    远程仓库创建好后,出现版本冲突,提交不成功,pull也会失败的解决方法
    改变开发的未来 | 探索无服务器与人工智能的协同效应
    用DBCC checkcatalog(数据库)检测出结构异常
    计算机网络:网络层
    选择适合您的项目管理软件:哪个更好?
  • 原文地址:https://blog.csdn.net/N201871643/article/details/132995065