- 博客(31)
- 资源 (7)
- 收藏
- 关注
原创 【Django】模型delete返回值判断
例子: result = DmsSysUser.objects.filter(id=request.POST.get('id')).delete() print(type(result)) print(result) 删除成功,结果如下: <class ‘tuple’> (1,{‘DMS.DmsSysUser’:1}) 删除失败,结果如下: <class ‘...
2020-01-16 10:48:44
1652
原创 python AES 加密
#!/usr/bin/python3 # -*- coding:utf-8 -*- from Cryptodome.Cipher import AES from binascii import b2a_hex, a2b_hex # AES加密秘钥 AES_CRYPTO_KEY = "AIoT_DMS-LJG" DEFAULT_USER_PWD = "123456" def add_to_...
2020-01-15 19:53:43
314
原创 layui的模板语言和django的模板语言{{}}冲突问题
需要在{{}}前后加上{% verbatim %} 和 {%endverbatim%}标签即可 <script type="text/html" id="switchTpl"> <input type="checkbox" disabled name="status" value="{% verbatim %}{{d.status}}{% endverbatim...
2020-01-15 19:49:07
523
原创 【django】TypeError: Object of type datetime is not JSON serializable
views.py中编写如下代码(需要import的东西自己补充): def utc_to_local(utc_dt): local_tz = pytz.timezone(settings.TIME_ZONE) local_format = "%Y-%m-%d %H:%M:%S" local_dt = utc_dt.replace(tzinfo=pytz.utc).ast...
2020-01-09 19:23:08
1985
原创 Windows下获取GUID
#include "stdafx.h" #include ////////////////////////////////////////////////////////////////////////// //获取guid需要的头文件 #include #pragma comment(lib, "Rpcrt4.lib") //获取guid BOOL GetGUID(CStr
2012-03-08 11:05:20
7882
1
原创 GetIconInfo获取ICON的大小
ICONINFO iconInfo; ::GetIconInfo(m_hLiteIcon, &iconInfo); BITMAP bitmap; ::GetObject(iconInfo.hbmColor, sizeof(BITMAP), &bitmap); m_byIconW = (byte)bitmap.bmWidth; m_byIconH
2011-12-07 19:00:30
4167
原创 C++对象的地址
1、对象的地址是该对象拥有的所有地址中的最小地址; 2、每个类中的非静态成员变量的声明顺序将会决定其地址值的大小,声明越靠后,地址值越大; 3、继承和虚继承会影响父类和子类地址的分配顺序; 4、以上的前提条件是在VS2008环境、无空类、无静态成员变量的情况下测试出来的;
2011-01-08 15:29:00
6544
原创 C++ 空类
VS2008环境下 空类:没有数据成员,没有函数的类。(不包括默认的) 1) 无继承关系的空类大小为1; 2) 有虚继承的,对每一个虚继承基类,都有一个虚基类索引,占4字节; 3) 空类继承多个空类,大小仍然是1; 4) 空类虚继承N个空类,大小为N*4; 5) 空类虚继承N个空类,继承M个空类,大小是N*4; 6) 我认为空类的区分是默认的1字节的地址或者虚继承中的某个虚基类索引的地址,两者只取其一即可,也就是说空类对象的地址应该是与这两个中的一个相等的。
2011-01-06 14:39:00
1528
翻译 MakeSureDirectoryPathExists
MakeSureDirectoryPathExists FunctionCreates all the directories in the specified path, beginning with the root.
2010-12-23 09:09:00
8063
翻译 getpeername
This function is used to obtain the peer's socket address information on a connected socket.
2010-12-22 10:02:00
470
翻译 inet_addr
this function returns an IP address as a 32-bit unsigned long integer in network-byte order.
2010-12-22 09:54:00
383
翻译 Shell_NotifyIcon
Shell_NotifyIconThis function sends a message to the system to add, modify, or delete an icon from the taskbar status area.
2010-12-22 09:36:00
2340
1
Network Programming for Microsoft Windows 2nd
2010-12-23
Effective C++ & More Effective C++.chm
2010-12-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人