码迷,mamicode.com
首页 >  
搜索关键字:replacement new    ( 74933个结果
链表反转实现
方法一:双指针法 采用就地反转,不用额外开辟空间 注意:接收链表的head节点,返回当前节点 方法二:递归法 代码如下: class Node(object): def __init__(self, item, next=None): self.item = item self.next = nex ...
分类:其他好文   时间:2021-04-21 12:23:41    阅读次数:0
手写promise完成异常处理和状态只能够修改一次
8.处理 Promise 抛出的异常 <script src="./Promise.js"></script> <script type="text/javascript"> let p = new Promise((resolve, reject) => { throw 'error'; }) p ...
分类:其他好文   时间:2021-04-21 12:20:24    阅读次数:0
设计模式的一些日常记录
内容是看了设计模式之禅,然后自己写个文档总结到一起,便于查看。 单例模式:(程序运行过程中只能有一个类的对象) 单例模式主要是对构造方法进行私有化 private,防止外部通过 new方法 创建实体类。针对该类中的方法尽量使用static修饰,便于访问。 public class Singleton ...
分类:其他好文   时间:2021-04-21 12:14:09    阅读次数:0
PHP 实现大文件视频推流
/** * 视频推流 * 返回视频流 */ function bofang(){ set_time_limit(0); ini_set('max_execution_time', 0);//秒为单位,自己根据需要定义 ini_set("memory_limit",-1); $moviePath = ...
分类:Web程序   时间:2021-04-21 12:10:47    阅读次数:0
Sqoop 的安装使用
1:下载地址 http://mirrors.hust.edu.cn/apache/sqoop/1.4.6/ 2:上传压缩包 scp sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz root@hadoop2:/opt/software 3:解压并重命名 tar - ...
分类:其他好文   时间:2021-04-21 12:09:16    阅读次数:0
c# 时间区间求并集
var list={};//有时间的集合 createtime endtime 时间戳 int 单位 精确到秒 var ranges = new List<IEnumerable<int>>(); list.ForEach(s => ranges.Add( Enumerable.Range(s.cr ...
分类:Windows程序   时间:2021-04-21 11:56:30    阅读次数:0
Leetcode 1079 活字印刷 回溯
回溯解法,JAVA: public final int numTilePossibilities(String tiles) { Set<String> set = new HashSet<String>(); search(tiles.toCharArray(), "", tiles.length ...
分类:其他好文   时间:2021-04-20 15:41:31    阅读次数:0
Vuex----Getters
Getter 用于对 Store中的数据进行加工处理形成新的数据。 Getter 不会修改 Store 中的原数据,它只起到一个包装器的作用,将Store中的数据加工后输出出来。 const store = new Vuex.Store({ state:{ count:0 }, getters: { ...
分类:其他好文   时间:2021-04-20 15:30:26    阅读次数:0
Array.prototype.fill 填充值被复用的问题
考察如下示例代码: // 创建二维数组 const arr = Array(2).fill([]); // 操作第一个元素 arr[0].push(1); // 结果是操作了所有数组 console.log(arr); // [ [ 1 ], [ 1 ] ] 和 new 不 new 关系,以下代码问 ...
分类:其他好文   时间:2021-04-20 15:27:38    阅读次数:0
时间戳转date
Date date = new Date(((java.sql.Timestamp) message.getSendTime()).getTime()); DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); format. ...
分类:其他好文   时间:2021-04-20 15:27:23    阅读次数:0
74933条   上一页 1 ... 48 49 50 51 52 ... 7494 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!