django在创建项目时自动在应用下的创建了test.py,这个py文件可以作为测试文件;也可以在应用下手动创建一个py测试文件。无论哪种方式,都需要提前书写以下代码: from django.test import TestCase # test.py中无需手动导入,手动创建的测试文件需导入 im ...
分类:
其他好文 时间:
2021-04-23 11:51:09
阅读次数:
0
#!/usr/bin/env python # -*- coding:utf-8 -*- # <editable> def execute(): # <editable> ''' 载入模块 ''' from collections import Counter import pandas as pd ...
分类:
编程语言 时间:
2021-04-23 11:49:29
阅读次数:
0
方法1 select count(1) from sys.objects where name = 'student' 方法2 SELECT table_name FROM information_schema.TABLES WHERE table_name ='student' 程序员阿飞 202 ...
分类:
数据库 时间:
2021-04-22 16:12:38
阅读次数:
0
上班想摸鱼?为了摸鱼方便,今天自己写了个爬取笔阁小说的程序。好吧,其实就是找个目的学习python,分享一下。 1. 首先导入相关的模块 import os import requests from bs4 import BeautifulSoup 2. 向网站发送请求并获取网站数据 网站链接最后的 ...
分类:
编程语言 时间:
2021-04-22 16:03:13
阅读次数:
0
MySQL中"full outer join"的实现 表ta 表tb 使用:【left join】 union 【right join】 select t1.dim_a, t1.qty qty_a, t2.dim_a dim_b, t2.qty qty_b from ta t1 left join ...
分类:
数据库 时间:
2021-04-22 15:56:52
阅读次数:
0
1. 在项目目录下执行go mod init 项目名 2. 在文件中import 导入gin 3. 在项目目录下执行go mod tidy 来自 <https://www.bilibili.com/video/BV1gJ411p7xC?p=4&spm_id_from=pageDriver> gola ...
分类:
其他好文 时间:
2021-04-22 15:34:29
阅读次数:
0
1 // 将axios再次封装 2 import axios from 'axios'; // npm i -S axios 3 4 import Qs from 'qs' // npm i -S qs 5 6 // 提示组件 mint-ui 中的提示组件 7 8 axios.defaults.wi ...
分类:
移动开发 时间:
2021-04-22 15:33:35
阅读次数:
0
##合并表select * from empunion allselect * from dept; select * from emp,dept;##连接查询select* from emp,dept where emp.deptno = dept.deptno; ##标准写法select *fr ...
分类:
数据库 时间:
2021-04-22 15:30:06
阅读次数:
0
恢复内容开始 查询emp中的所有表: select * from emp; 在日常工作中 不建议使用* 因为查询效率较低 常用命令: select database(); 查看当前使用的是哪个数据库 \c 命令,结束一条语句。 exit 命令,退出mysql。 查看创建表的语句: show crea ...
分类:
数据库 时间:
2021-04-22 15:23:44
阅读次数:
0
DML:数据操作语言 DML用于查询与修改数据记录,包括以下SQL语句: *INSERT:添加数据到数据库中 *UPDATE:修改数据库中的数据 *DELETE:删除数据库中的数据 *SELECT:选择(查询)数据 >SELECT 是SQL语言的基础,最为重要 例子:查询一个表的信息 SELECT ...
分类:
数据库 时间:
2021-04-22 15:23:24
阅读次数:
0