近期偶然间看到一个开源项目minimp3 Minimalistic MP3 decoder single header library 项目地址: https://github.com/lieff/minimp3 单文件头的最小mp3解码器。 一直很想抽时间好好看上一看。 最好的学习方式就是写个实用 ...
分类:
编程语言 时间:
2018-01-14 12:06:25
阅读次数:
734
最近在 review 代码时发现同事没有像其他项目那样使用 AutoMapper.Mapper.Initialize() 静态方法配置映射,而是使用了依赖注入 IMapper 接口的方式。于是趁机学习了解一下,在 github 上发现了 AutoMapper.Extensions.Microsoft... ...
分类:
移动开发 时间:
2018-01-13 20:43:45
阅读次数:
1679
注解高级(原文再续书接上一回) 7.继承映射 第一种:InheritanceType.JOINED 查询时会出现很多join语句. 第二种:InheritanceType.SINGLE_TABLE 所有子类属性中不能加非空约束 第三种:InheritanceType.TABLE_PER_CLASS ...
分类:
Web程序 时间:
2018-01-13 15:38:34
阅读次数:
219
先看一幅图吧: 这幅图清晰地表达了六大设计原则,但仅限于它们叫什么名字而已,它们具体是什么意思呢?下面我将从原文、译文、理解、应用,这四个方面分别进行阐述。 1.单一职责原则(Single Responsibility Principle - SRP) 原文:There should never b ...
分类:
编程语言 时间:
2018-01-13 14:14:50
阅读次数:
190
1 # 单例模式:无法支持多线程情况 2 """ 3 class Singleton(object): 4 def __init__(self): 5 import time 6 time.sleep(1) 7 @classmethod 8 def instance(cls, *args, **kw ...
分类:
编程语言 时间:
2018-01-13 12:58:46
阅读次数:
124
<!DOCTYPE html> <html> <head> <title>WMS GetFeatureInfo (Tile Layer)</title> <link rel="stylesheet" href="https://openlayers.org/en/v4.2.0/css/ol.css" ...
分类:
其他好文 时间:
2018-01-12 17:16:04
阅读次数:
2572
A torch.Tensor is a multi-dimensional matrix containing elements of a single data type. 张量(torch.Tensor)是包含单个数据类型元素的多维矩阵。 1、张量定义了如下八种CPU张量类型和八种GPU张量类型 ...
分类:
其他好文 时间:
2018-01-11 16:09:15
阅读次数:
279
给EditText外加一个ScrollView,将高度设置统一,并给ScrollView设置属性 ...
分类:
移动开发 时间:
2018-01-11 11:31:07
阅读次数:
255
##什么是枚举,特点,使用场景 It is a compile-time error if an enum declaration has the modifier abstract or final. 不能被继承,不能修改,否则会编译错误; 枚举作为内部类时,默认静态的,不用声明为 static; ...
分类:
其他好文 时间:
2018-01-10 15:30:48
阅读次数:
139