牛二的梦想  
02 2019 档案
  • loadtxt函数
    摘要:numpy.loadtxt Load data from a text file. Each row in the text file must have the same number of values. Parameters: fname : file or str File, filenam 阅读全文
    posted @ 2019-02-28 16:21 牛二的梦想 阅读(920) 评论(0) 推荐(0)
  • django model设计与实际数据库表的对比
    摘要:其中article表 mysql的DDL CREATE TABLE `les_article` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(70) NOT NULL, `excerpt` longtext NOT NULL, `vi 阅读全文
    posted @ 2019-02-27 09:14 牛二的梦想 阅读(660) 评论(0) 推荐(0)
  • 关于浏览器的缓存问题
    摘要:今天学习css,修改bootstrap.min.css文件,改了半天就是没反应。 后来网上搜了半天,原来是浏览器的缓存问题,清除缓存后,正常显示了。 意外收获: 浏览器,点右键 【检查】 可以改好CSS文件后,点进去复制,再拷贝覆盖自己系统里面的CSS源文件。 阅读全文
    posted @ 2019-02-26 13:45 牛二的梦想 阅读(170) 评论(0) 推荐(0)
  • django.db.utils.OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: ...
    摘要:出现此问题的解决方法: 在mysql中创建一个和settings.py里设置的mysql 'name'名字一样的数据库就可以了。 阅读全文
    posted @ 2019-02-25 10:16 牛二的梦想 阅读(3561) 评论(0) 推荐(0)
  • loadtxt()函数的糟心历程
    摘要:原计划:导入一个csv文件,然后算出平均值 import numpy as np c=np.loadtxt('d:\python36\data.csv', delimiter=',', usecols=(2,), unpack=True) print ("median =", np.median(c 阅读全文
    posted @ 2019-02-23 16:03 牛二的梦想 阅读(2864) 评论(0) 推荐(1)
  • 关于loadtxt编码问题的解决方法
    摘要:I am trying to load data with numpy.loadtxt... The file im trying to read is using cp1252 coding. Is there a possibility to change the encoding to cp1 阅读全文
    posted @ 2019-02-23 12:10 牛二的梦想 阅读(2559) 评论(0) 推荐(1)
  • delete,truncate ,drop区别
    摘要:use [database_name]godelete from table_nameTest where FCRTime<(Select CONVERT(varchar(100),DATEADD(DAY,-30,getdate()), 112)) 'DELETE语句执行删除的过程是每次从表中删除一 阅读全文
    posted @ 2019-02-16 14:30 牛二的梦想 阅读(249) 评论(0) 推荐(0)
  • MSSQL语句学习(查询表的总记录数)
    摘要:如何高效查询表的总记录数(通用方法) 很多表都会设计一个步长为1的自增长整型(INT)列作为表主键,该做法优劣这里不展开讨论,仅基于这一"习惯",外加一个假设:该字段连续无为断,则可以使用MAX函数了,限制较多哈 1,自增长列 2,该列连续 阅读全文
    posted @ 2019-02-16 14:23 牛二的梦想 阅读(785) 评论(0) 推荐(0)
  • django网页分页
    摘要:{# 如果 a1 == a2 则显示 #} {% ifequal a1 a2 %} <h1>equal!</h1> {% else %} <h1>not equal!</h1> {% endifequal %} 附:Paginator类的解释,方法,属性 class Paginator(object 阅读全文
    posted @ 2019-02-12 17:56 牛二的梦想 阅读(215) 评论(0) 推荐(0)
  • VBA找相似体积的单元格值
    摘要:在VBA中做了一个比较体积,如果体积相似就显示隔壁单元格的内容 Function VC(a, b As Range) 'VolumeCompare体积比较 Dim arry() As Variant Dim i, c, d As Integer Dim kmin As Double Dim kmin 阅读全文
    posted @ 2019-02-12 15:16 牛二的梦想 阅读(217) 评论(0) 推荐(0)
  • $20
    摘要:A well known speaker started off his seminar by holding up a $20 bill.In the room of 200, he asked. "Who would like this $20 bill?"Hands started going 阅读全文
    posted @ 2019-02-11 17:17 牛二的梦想 阅读(169) 评论(0) 推荐(0)
  • django学习install apps注册错了的影响
    摘要:今天在学习例子的时候 不注意吧settings.py里面的INSTALL APPS 的APP应用名称写错了 应该是blog 写成了myblog 结果导致python manage.py makemigrations; python manage.py migrate没有反应。 在这个小坑上折腾了半个 阅读全文
    posted @ 2019-02-11 16:42 牛二的梦想 阅读(388) 评论(0) 推荐(0)
  • 轮播图不显示的坑
    摘要:settings.py#设置文件上传路径,图片上传、文件上传都会存放在此目录里MEDIA_URL = '/media/'MEDIA_ROOT = os.path.join(BASE_DIR, 'media') #PEP8:missing whitespace around operator os前后 阅读全文
    posted @ 2019-02-08 10:06 牛二的梦想 阅读(1509) 评论(0) 推荐(0)
  • django学习第一天
    摘要:class ModelAdmin(BaseModelAdmin): """Encapsulate all admin options and functionality for a given model.""" list_display = ('__str__',)# 列表里显示想要显示的字段 l 阅读全文
    posted @ 2019-02-05 20:37 牛二的梦想 阅读(139) 评论(0) 推荐(0)