- 博客(7)
- 收藏
- 关注
原创 Django models.py添加新数据出现的问题
原数据库的数据表Article:class Article(models.Model): STATUS_CHOICES=(('1','draft'), ('2','publish')) title = models.CharField(max_length=150)#文章的标题,最大长度100 category=models.Char...
2018-02-26 12:10:48 1756
转载 django.db.utils.OperationalError: (1050, "Table 'article_category' already exists") 数据库同步时错误解决方法
转自:http://blog.csdn.net/huanhuanq1209/article/details/77884014执行manage.py makemigrations 未提示错误信息,但manage.py migrate时进行同步数据库时出现问题;django.db.utils.OperationalError: (1050, "Table 'article_category' alre...
2018-02-25 23:57:39 2067
原创 Mysql 命令
启动:net start mysql关闭:net stop mysql登陆:创建数据库create database abc;选择数据库、显示数据库use 数据库名字show databases;查看表结构:desc 表名字显示当前数据库:select database();mysql> select database...
2018-02-25 23:00:57 161
原创 dp~Leetcode 377. Combination Sum IV
377. Combination Sum IVGiven an integer array with all positive numbers and no duplicates, find the number of possible combinations that add up to a positive integer target.Example:nums = [1, 2, 3]ta...
2018-02-21 21:12:11 187
原创 dp~Leetcode 718. Maximum Length of Repeated Subarray
718. Maximum Length of Repeated SubarrayGiven two integer arrays A and B, return the maximum length of an subarray that appears in both arrays.Example 1:Input:A: [1,2,3,2,1]B: [3,2,1,4,7]Output: 3...
2018-02-20 23:37:30 186
原创 map用法
find()find()原型:iterator find (const key_type& k);const_iterator find (const key_type& k) const;需要通过iterator来查找:#include <map>#include <stdio.h>#include <algorithm...
2018-02-10 12:09:22 172
原创 c++ fill()函数使用
fill函数原型:参考:http://www.cplusplus.com/reference/algorithm/fill/template <class ForwardIterator, class T> void fill (ForwardIterator first, ForwardIterator last, const T& val){ whil...
2018-02-10 11:41:19 17622 4
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人