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

news/2024/11/24 1:49:56/

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

目录

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

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

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

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

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

  • 笙默考试管理系统-MyExamTest

  return chunk.lines[n];

    }

    function lineNo(line) {

        if (line.parent == null) return null;

        var cur = line.parent, no = indexOf(cur.lines, line);

        for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {

            for (var i = 0, e = chunk.children.length; ; ++i) {

                if (chunk.children[i] == cur) break;

                no += chunk.children[i].chunkSize();

            }

        }

        return no;

    }

    function lineAtHeight(chunk, h) {

        var n = 0;

        outer: do {

            for (var i = 0, e = chunk.children.length; i < e; ++i) {

                var child = chunk.children[i], ch = child.height;

                if (h < ch) { chunk = child; continue outer; }

                h -= ch;

                n += child.chunkSize();

            }

  • 笙默考试管理系统-MyExamTest

            return n;

        } while (!chunk.lines);

        for (var i = 0, e = chunk.lines.length; i < e; ++i) {

            var line = chunk.lines[i], lh = line.height;

            if (h < lh) break;

            h -= lh;

        }

        return n + i;

    }

    function heightAtLine(chunk, n) {

        var h = 0;

        outer: do {

            for (var i = 0, e = chunk.children.length; i < e; ++i) {

                var child = chunk.children[i], sz = child.chunkSize();

                if (n < sz) { chunk = child; continue outer; }

                n -= sz;

                h += child.height;

            }

  • 笙默考试管理系统-MyExamTest

            return h;

        } while (!chunk.lines);

        for (var i = 0; i < n; ++i) h += chunk.lines[i].height;

        return h;

    }

    // The history object 'chunks' changes that are made close together

    // and at almost the same time into bigger undoable units.

    function History() {

        this.time = 0;

        this.done = []; this.undone = [];

}

  • 笙默考试管理系统-MyExamTest

    History.prototype = {

        addChange: function(start, added, old) {

            this.undone.length = 0;

            var time = +new Date, last = this.done[this.done.length - 1];

            if (time - this.time > 400 || !last ||

                last.start > start + added || last.start + last.added < start - last.added + last.old.length)

                this.done.push({start: start, added: added, old: old});

            else {

                var oldoff = 0;

                if (start < last.start) {

                    for (var i = last.start - start - 1; i >= 0; --i)

                        last.old.unshift(old[i]);

                    last.added += last.start - start;

                    last.start = start;

                }

  • 笙默考试管理系统-MyExamTest

                else if (last.start < start) {

                    oldoff = start - last.start;

                    added += oldoff;

                }

                for (var i = last.added - oldoff, e = old.length; i < e; ++i)

                    last.old.push(old[i]);

                if (last.added < added) last.added = added;

            }

            this.time = time;

        }

    };


http://www.ppmy.cn/news/1166605.html

相关文章

如何理解TCP/IP协议?

一、是什么 TCP/IP&#xff0c;传输控制协议/网际协议&#xff0c;是指能够在多个不同网络间实现信息传输的协议簇 TCP&#xff08;传输控制协议&#xff09; 一种面向连接的、可靠的、基于字节流的传输层通信协议 IP&#xff08;网际协议&#xff09; 用于封包交换数据网…

JVM——JVM概述以及双亲委派机制

JVM探究 请你谈谈你对JVM的理解&#xff1f;Java8虚拟机和之前的有什么变化更新&#xff1f;什么是OOM&#xff0c;什么是栈溢出StackOverFlowError&#xff1f;怎么分析&#xff1f;JVM的常用调优参数有哪些&#xff1f;内存快照如何抓取&#xff1f;怎么分析Dump文件&#x…

【USRP】软件无线电基础篇:长波、中波、短波

一、频率和波长 类型频率波长长波30&#xff5e;300千赫&#xff08;KHz&#xff09;10&#xff5e;1千米中波300&#xff5e;3000千赫&#xff08;KHz&#xff09;10&#xff5e;1百米短波3&#xff5e;30兆赫&#xff08;MHz&#xff09;100&#xff5e;10米 二、传输距离 …

spark获取hadoop服务token

spark 作业一直卡在accepted 问题现象问题排查1.查看yarn app日志2.问题分析与原因 问题现象 通过yarn-cluster模式提交spark作业&#xff0c;客户端日志一直卡在submit app&#xff0c;没有运行 问题排查 1.查看yarn app日志 appid已生成&#xff0c;通过yarn查看app状态为…

mysql MVC jsp实现表分页

mysql是轻量级数据库 在三层架构中实现简单的分页 在数据库sql编程中需要编写sql语句 SELECT * FROM sys.student limit 5,5; limit x,y x是开始节点&#xff0c;y是开始节点后的需要显示的长度。 在jdbc编程中需要给出x和y 一般是页数*页码&#xff0c;显示的长度。 代…

使用 pyspark 进行 Classification 的简单例子

This is the second assignment for the Coursera course “Advanced Machine Learning and Signal Processing” Just execute all cells one after the other and you are done - just note that in the last one you have to update your email address (the one you’ve u…

怎么解决 Http 协议无状态?

一、Http 协议无状态的含义 1.1 有状态协议 常见的许多七层协议实际上是有状态的&#xff0c;例如 SMTP 协议&#xff0c;它的第一条消息必须是 HELO&#xff0c;用来握手&#xff0c;在 HELO 发送之前其他任何命令都是不能发送的&#xff1b;接下来一般要进行 AUTH 阶段&#…

Ubuntu - 安装 、配置 Redis 远程连接和密码

在Ubuntu上安装Redis 要在Ubuntu上安装Redis&#xff0c;需要按照以下步骤操作&#xff1a; 打开终端&#xff1a;使用CtrlAltT快捷键或在应用程序中搜索终端来打开终端。 更新系统包列表&#xff1a;在终端中运行以下命令&#xff0c;以确保系统中的软件包列表是最新的&…