码迷,mamicode.com
首页 > 2021年01月16日 > 全部分享
Python - Django 执行 migrate 操作时异常: django.db.utils.OperationalError: (1051, "Unknown table 'xxx'")
问题场景: 当执行 python manage.py migrate 操作时, 报错 (1051, "Unknown table 'xxx'"), 这时数据库中是没有 'xxx' 这个表的 解决: 1. 先将 models.py 中你更新失败的表给注释掉 2. 注释掉后执行 python manag ...
分类:数据库   时间:2021-01-16 11:58:30    阅读次数:0
JSX 空的根元素
空元素 JSX 允许空的根元素,从而打破深嵌套。ReactRouter.HashRouter等组件都是空元素实现的。 return ( < > < > <div></div> <div></div> </> </> ); import * as React from 'react'; import ...
分类:Web程序   时间:2021-01-16 11:58:18    阅读次数:0
redis实现禁止重复请求的切面小功能
场景:3秒时间内禁止重复提交! Controller: 伪代码 package com..aopCommit; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web. ...
分类:其他好文   时间:2021-01-16 11:57:58    阅读次数:0
info sharp Are you trying to install as a root or sudo user? Try again with the --unsafe-perm flag
执行 npm install 编译出错,提示 ERR! sharp EACCES: permission denied, mkdir '/root/.npm' info sharp Are you trying to install as a root or sudo user? Try again ...
分类:其他好文   时间:2021-01-16 11:57:44    阅读次数:0
DNSmasq初步使用
DNSmasq,百度百科说,它是一个小巧且方便地用于配置DNS和DHCP的工具,适用于小型网络,它提供了DNS功能和可选择的DHCP功能。DNSmasq轻量且易配置,适用于个人用户或少于50台主机的网络,我也是最近在安装OpenShift的过程中,才对DNSmasq有所了解,特此记录一下。 DNSm ...
分类:其他好文   时间:2021-01-16 11:57:32    阅读次数:0
Medium | LeetCode 264 | 剑指 Offer 49. 丑数 | 动态规划
剑指 Offer 49. 丑数 难度中等105 我们把只包含质因子 2、3 和 5 的数称作丑数(Ugly Number)。求按从小到大的顺序的第 n 个丑数。 示例: 输入: n = 10 输出: 12 解释: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12 是前 10 个丑数。 说 ...
分类:其他好文   时间:2021-01-16 11:57:17    阅读次数:0
Java并发
Java 并发 Java 并发 一、使用线程 实现 Runnable 接口 实现 Callable 接口 继承 Thread 类 实现接口 VS 继承 Thread 二、基础线程机制 Executor Daemon sleep() yield() 三、中断 InterruptedException ...
分类:编程语言   时间:2021-01-16 11:56:57    阅读次数:0
Centos7 隐藏ssh(OpenSSH) 版本号
参考:https://www.yangliuan.cn/?p=1090 1.安装所需工具 yum install --downloadonly --downloaddir=rpm gcc gcc-c++ glibc make autoconf openssl openssl-devel pcre-d ...
分类:其他好文   时间:2021-01-16 11:56:39    阅读次数:0
Python使用with open() as读写文件
一、读取文件抛出异常 在之前的博文里,我们说到:要以读文件的模式打开一个文件对象,使用Python内置的open()函数,传入文件名和标示符: f = open('test.txt', 'r') 标示符'r'表示读文件。这样,我们就成功地打开了一个文件。但是,如果这个文件不存在,那么此时open() ...
分类:编程语言   时间:2021-01-16 11:56:28    阅读次数:0
MYSQL:case when用法
一、case when的使用方法 Case具有两种格式。简单Case函数和Case搜索函数。 第一种 格式 : 简单Case函数 : 格式说明 case 列名 when 条件值1 then 选项1 when 条件值2 then 选项2....... else 默认值 end eg: select c ...
分类:数据库   时间:2021-01-16 11:56:08    阅读次数:0
自定义推荐央视
/*文章内图片*/ #cnblogs_post_body p img { margin:10px; } /*顶一下*/ .diggnum { font-size:28px; color:#6DA47D; font-family:'Microsoft Yahei'; } #div_digg{ widt ...
分类:其他好文   时间:2021-01-16 11:55:56    阅读次数:0
Performance Profiling of .NET Core 3 applications on Linux with dotnet-trace and PerfView(转发)
原文: https://michaelscodingspot.com/dotnet-trace/ Performance issues never seem to disappear from the world, no matter how fast new computers become. T ...
分类:移动开发   时间:2021-01-16 11:55:44    阅读次数:0
04.循环结构
1、while循环: ''' 猜字游戏 ''' import random number = random.randint(1,101) jishu = 0 while 1: num = int(input('请输入一个数字:')) if num > number: print('小一点') eli ...
分类:其他好文   时间:2021-01-16 11:55:22    阅读次数:0
【答疑汇总】HarmonyOS组件的分布式适配和应用畅想
1、开发板是什么级别,类似51单片机,ESP8266或nanopi之类?答:本次直播抽奖的WIFI Iot智能家居套件是可以运行鸿蒙OS的开发版套件,采用3861芯片。比51单片机的算力要强很多。 2、画的组件有点击或者触摸事件? 答:单击或触摸事件需要通过ClickListner和TouchEve ...
分类:其他好文   时间:2021-01-16 11:55:03    阅读次数:0
断点是否在圆内
/// <summary> /// 判断点是否在圆内 /// </summary> /// <param name="pointX">点的X坐标</param> /// <param name="pointY">点的Y坐标</param> /// <param name="circleCenterX ...
分类:其他好文   时间:2021-01-16 11:54:46    阅读次数:0
The Tomcat connector configured to listen on port 80 failed to start.端口占用,解决方案
启动项目报 The Tomcat connector configured to listen on port 8080 failed to start. 原因:80端口被占用,可能是编辑器闪退时没停止项目,导致项目还在运行 解决: 1.打开CMD,输入 netstat -ano 2.找到对应的端口 ...
分类:其他好文   时间:2021-01-16 11:54:31    阅读次数:0
mongo常用命令
mongo --port 端口 查看用户use admindb.system.users.find().pretty() 查询操作次数db.serverStatus().opcounters 查看参数use admindb.adminCommand({getParameter:"*"})因为mgse ...
分类:其他好文   时间:2021-01-16 11:54:15    阅读次数:0
133条   上一页 1 2 3 4 5 6 7 8 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!