找到约 10000 条结果
  • 1. 实现点击li标签弹出索引
    {代码...}
    2021-03-16
  • JavaScript-实现数据结构-栈
    栈,后进先出,受限制的线性表。只允许在一端进行添加和删除操作。以下代码是栈的封装及使用: {代码...}
    2020-09-05
  • 超时调用与间歇调用
    一、超时调用setTimeout()setTimeout() 方法用于在指定的毫秒数后调用函数或计算表达式。 {代码...} code/function必需。要调用一个代码串,也可以是一个函数。milliseconds可选。执行或调用 code/function 需要等待的时间,以毫秒计。默认为 0。param1, param2, ...可选。 传给执行函数的其他参数(IE9 及其更早版本不...
    2021-09-24
  • 了解PHP容器(Container)的实现
    看 Laravel 源代码了解 Container Dependency Injection Containers 的基本功能: Container 管理对象实例化到配置的过程 对象本身不知道自己是由 Container 管理的,对 Container 一无所知。 这就是为什么 Container 能够管理任何 PHP 对象。 对象使用 DI 来管理依赖关系非常好,但不是必须的。 i {代码...} ii A {代码...
    2019-06-13
    3
  • 重试机制的实现
    服务在请求资源,如果遇到网络异常等情况,导致请求失败,这时需要有个重试机制来继续请求。 常见的做法是重试3次,并随机 sleep 几秒。 业务开发的脚手架,HTTP Client 基本会封装好 retry 方法,请求失败时根据配置自动重试。下面以一个常见的 HTTP Client 为例, 看下它是如何实现请求重试。 最后整理其他一些重试机...
    2020-09-30
  • jQuery初长成
    首先声明函数jQuery()并在函数中声明一个封装了两个函数的对象,以实现给元素加class和添加文本的功能;其次在函数中判断所传参数是否为字符串还是节点;接着编写addClass与setText方法;最后返回对象nodes,可以调用对象中的方法,大功告成。
    2019-03-23
  • js获取内(外)网真实IP地址(WebRTC)及内网端口扫描
    虽然WebRTC已经不是什么新技术了,用JavaScript进行内网渗透,网上也有说明,但是都没怎么放出代码。这里就就放出我自己的写的。getIPs(function(ip){...} 效率不怎么高,如有更高者可以在下面给出。
    2015-06-09
  • ECE220 LC-3 编译器实现细节分享
    此任务要求您使用递归将C语言子集中的程序描述转换为LC-3汇编代码。开发这样的代码为您提供了在C中使用递归和基于指针的数据结构的经验,这两种都是重要的工具。您还将更好地了解从一种形式的程序到另一种形式自动化翻译所涉及的方法和挑战。大部分编译器将提供给您,包括将C代码转换为抽象语法树(AST)的代码,以及支...
    2023-11-15
  • Cryptography 密码分析
    Introduction to Modern CryptographyProblem Set 2Tom ShrimptonDue by 11:59pm on 2/23/2021. Also, please include the last name of at least one of yourgroup members in the .pdf filename. Thanks. Problem 1. Let Π = (E, D) be an IV-based encryption scheme, with IV-space V and key-spaceK, and with fixe...
    2022-03-24
  • CSC 503/SENG 474: 2
    Due on: Friday, JUNE 25th at 23:59 PSTWhere: Brightspace ([链接]Instructions: >? You must complete this assignment entirely on your own. In other words, you should come upwith the solution yourself, write the code yourself, conduct the experiments yourself, analyze theresults yourself, and fin...
    2021-06-18
  • SAP UI5和Vue的数据双向绑定实现原理比较
    Two-way data binding in UI5Two way data binding test: Control property change leads to model field changeTwo way data binding test: model field change leads to control property changeTwo way data binding in VueTwo way data binding test: model field change leads to control property changeTwo way d...
    2020-08-29
  • CS260 Algorithms 分析
    CS260 AlgorithmsClass Test30 November 2020Answer: BOTH Question 1. AND EXACTLY ONE of Questions 2. or 3.MAKE IT CLEAR on the first page whether you have answered Question 2. or Question 3.Only one of them will be marked so do not attempt to answer both.Submit ONE PDF FILE to Tabula after 9am and ...
    2021-11-01
  • CS260 算法分析
    CS260 AlgorithmsClass Test30 November 2020Answer: BOTH Question 1. AND EXACTLY ONE of Questions 2. or 3.MAKE IT CLEAR on the first page whether you have answered Question 2. or Question 3.Only one of them will be marked so do not attempt to answer both.Submit ONE PDF FILE to Tabula after 9am and ...
    2022-07-30
  • 仿Vue原理写的例子,初步解析Vue原理
    我们新建一个 smallVue.js 文件,内容如下: {代码...} 然后再新建一个test.html文件,内容如下: {代码...} 大家可以运行试一下
    2018-03-20
  • SAP UI5和Angular的事件处理机制比较
    Recently I am studying Angular in my spare time. And I would like to write down here what I have learned about Angular, comparing its design with UI5. In this blog I will only focus on event handling topic.
    2020-05-07
  • rem的使用
    {代码...}
    2020-09-25
  • js设计模式--命令模式
    前言 本系列文章主要根据《JavaScript设计模式与开发实践》整理而来,其中会加入了一些自己的思考。希望对大家有所帮助。 文章系列 js设计模式--单例模式 js设计模式--策略模式 js设计模式--代理模式 js设计模式--迭代器模式 js设计模式--发布订阅模式 概念 命令模式中的命令(command)指的是一个执行某些特定事情的指令...
    2019-01-04