List<int> lstHashCode = (from d in dtEquipInfo.AsEnumerable() select d.Field<int>("hashcode")).Distinct().ToList(); 其中dtEquipInfo是一个带有hashcode列的DataTa ...
分类:
其他好文 时间:
2020-07-16 22:00:28
阅读次数:
114
DRF之JWT补充 1.JWT控制用户登录后才能反问,匿名用户无法访问 class QueryUserView(GenericViewSet, RetrieveModelMixin): """ 查询接口 """ queryset = User.objects.all() serializer_cla ...
分类:
其他好文 时间:
2020-07-16 00:13:27
阅读次数:
71
一,引用ocelot,本文测试16版本有BUG,只好使用15.0.7 二,startup的配置,很简单,就是注册和添加管道 using System; using System.Collections.Generic; using System.Linq; using System.Threadin ...
分类:
Web程序 时间:
2020-07-15 10:44:39
阅读次数:
92
# 当配置中需要配置内存大小时,可以使用 1k, 5GB, 4M 等类似的格式,其转换方式如下(不区分大小写) # # 1k => 1000 bytes # 1kb => 1024 bytes # 1m => 1000000 bytes # 1mb => 1024*1024 bytes # 1g = ...
分类:
其他好文 时间:
2020-07-14 18:18:50
阅读次数:
52
Author:Laoqi Django REST framework提供了分页的支持。 可以在配置文件中设置全局的分页方式,如: REST_FRAMEWORK = { 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberP ...
分类:
其他好文 时间:
2020-07-14 00:44:07
阅读次数:
64
Vue 实现 双向数据绑定 主要采用:数据劫持结合“发布-订阅”模式的方式,通过Object.defineProperty()的 set 和 get,在数据变动时发布消息给订阅者触发监听。 Object.defineProperty( )是用来做什么的?它可以来控制一个对象属性的一些特有操作,比如读 ...
分类:
其他好文 时间:
2020-07-13 21:34:06
阅读次数:
77
学习地址:https://www.bilibili.com/video/BV1mf4y1S72o?p=18 实例练习一(创建一个柱的族) using System; using System.Collections.Generic; using System.Linq; using System.T ...
分类:
其他好文 时间:
2020-07-12 16:24:00
阅读次数:
82
开源地址: git地址:https://gitee.com/aprl/kmx-MP4 git clone https://gitee.com/aprl/kmx-MP4.git Cloning into 'kmx-MP4'... remote: Enumerating objects: 21, don ...
分类:
其他好文 时间:
2020-07-12 01:02:31
阅读次数:
76
学习地址:https://www.bilibili.com/video/BV1mf4y1S72o?p=11 实例练习一 using System; using System.Collections.Generic; using System.Linq; using System.Text; usin ...
分类:
其他好文 时间:
2020-07-11 21:22:24
阅读次数:
136
一、create优化 在serializer序列化中,我们通过创建序列化器对象的方式大大地简化了视图函数的代码,前端传入的数据通过反序列化操作进行了各种数据校验,代码如下: from django.http import JsonResponse from django.views import V ...
分类:
其他好文 时间:
2020-07-11 20:56:57
阅读次数:
69