瀑布流js实现 1 // 页面尺寸改变时实时触发 2 window.onresize = function() { 3 //重新定义瀑布流 4 waterFall(); 5 }; 6 7 //初始化 8 window.onload = function(){ 9 console.log("开始瀑布流 ...
分类:
Web程序 时间:
2020-07-26 01:42:52
阅读次数:
97
本篇我们将学习面向对象中的接口和多态,接口类似我们之前学习继承时的父类或抽象类,接口与众不同的时,接口中跟多的定义事物的功能(方法),子类或实现类可以实现或重写接口中的方法。而接口或继承,则是多态的前提。合理地利用多态可以提高我们程序的可扩展性和灵活性。 ...
分类:
编程语言 时间:
2020-07-25 23:20:01
阅读次数:
63
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style> *{ margin:0; padding:0; } .test{ position:fixed; left:50px; top:50px; wid ...
分类:
其他好文 时间:
2020-07-24 22:05:51
阅读次数:
74
C:\Program Files (x86)\Jenkins\plugins\ruby-runtime\WEB-INF\lib\classes.jar: The process cannot access the file because it is being used by another pr ...
分类:
其他好文 时间:
2020-07-24 21:30:48
阅读次数:
197
使用情景:系统通知用户,通知方式有站内信,邮件,手机短信3种方式,信的内容分普通,紧急两种程度,为了不避免两两组合,m* n种可能的搭配,使用桥接模式 // 抽象 abstract class Info{ protected $_send = null; // 发送器 (site, email, s ...
分类:
Web程序 时间:
2020-07-24 09:18:59
阅读次数:
95
每摆放一个皇后,都检查和之前所有皇后是否冲突,否则回溯 1,ArrayQueen[i] == ArrayQueen[n]皇后是否在同一列2,Math.Abs(n - i) == Math.Abs(ArrayQueen[n] - ArrayQueen[i])皇后是否在同一斜线上 C#代码实现如下: u ...
分类:
其他好文 时间:
2020-07-22 15:44:03
阅读次数:
57
1.接口:扩展性,具备某些本领 2.接口的特点: a.接口用关键字interface表示, interface XXX{} b.类实现接口用implements关键字表示, class 类名 implements 接口名{} c.接口不能实例化,只能按照多态的方式进行实例化,接口类多态也是最常见的多 ...
分类:
编程语言 时间:
2020-07-22 15:33:16
阅读次数:
64
import { createMachine, assign, interpret } from "xstate"; const elBox = document.querySelector("#box"); const elBody = document.body; const assignPoi ...
分类:
Web程序 时间:
2020-07-21 22:21:20
阅读次数:
88
帮助实现多重继承,实现不相关类的相同行为 定义接口 public interface IStringList { void Add(string s); int Count {get;} string this[int index]{get;set}; } //public abstract被省略了 ...
?transfomer是谷歌在17年论文 Attention Is All You Need(https://arxiv.org/abs/1706.03762)里提出来的。是为了解决机器翻译问题而生的。在Attention Is All You Need这篇paper中整个模型还是采用encoder ...
分类:
其他好文 时间:
2020-07-20 15:25:03
阅读次数:
110