“2018年8月”存档文章有32

How to not register your website through your mobile phone

Now you need to enter a phone number to register your username on major websites in China. Some websites are better and will not harass you. However, some websites have received various numbers since ...

sql update 查询实例

最近好久没有使用sql update做查询了,今天用起来突然不会写了,记录一下,以备不时之需。UPDATE article SET body_html = '<header> <h1>感谢信</h1></header><p>经营这个网站不容易,要时刻关注手机端网络是否畅通,短信是否及时转发,我又要上班,晚上还要抽时间照顾我家可爱的宝宝。</p><p>昨天居然还有人用我手机订购绿钻,我也是无语...

Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=';

最近更新数据库的时候报如下错误:Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=';在SQLAlchemy报错的内容是:sqlalchemy.exc.OperationalError: (_mysql_exceptions.Operation...

push of current branch was rejected remote changes need to be merged before pushing

最近使用PyCharm的时候,由于远程已经更新,但是本地需要提交代码,使用github提示如下问题:push of current branch was rejected remote changes need to be merged before pushing出错原因:是因为远程repository和我本地的repository冲突导致的,而我在创建版本库后,在github的版本库页修改了文...

Cannot change column 'b_name': used in a foreign key constraint 'material_product_ibfk_1' of table 'Material_Development.material_product'

最近修改数据库编码格式的时候,参考了这篇文章:1366, "Incorrect string value: '\\xE9\\xBB\\x84\\xE5\\x85\\xB5' for column 'fullname' at row 1",结果报如下错误:Cannot change column 'b_name': used in a foreign key constraint 'material...

形如:{data:Array(1)}的Javascript数组如何解析

最近需要解析一个Javascript数组,结构如下:{data:Array(1)}之后展开Array(1)来看,内容如下:0:{catalog_name: "有色金属", catalog_since: "Mon, 06 Aug 2018 07:24:27 GMT", id: 1}前面的0是一个索引,现在只有一条数据,当然后面重复数据会比较多。结题思路:1、首先获得data的内容:item=data...

flask 处理robots.txt文件

最近网站上线有一段时间,这是一个在线接收短信的网站。监测google的关键词点击,但是Search Console提示:由于无法访问您网站的 robots.txt 文件,因此 Google 无法抓取您的网站。之后将robots.txt文件上传,但是访问提示502错误。如图:原因:robots.txt文件放在templates文件下无法访问,具体截图如下:解决方案:将robots.txt文件存放st...

SQLAlchemy级联查询

最近使用SQLAlchemy做级联查询,记录如下:SQLAlchemy级联查询:u = db.session.query(ClassificationCatalog.classification_id).group_by( ClassificationCatalog.classification_id).subquery() for a in db.session.query(...