“2020年6月”存档文章有30

Python not运算

下面是一些not运算符:Python 2.7 (r27:82500, Sep 16 2010, 18:02:00) [GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> True == True ...

Ubuntu 在命令行下查看隐藏文件

再Ubuntu系统如何查看隐藏文件,具体命令如下:ls -a

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

最近上线运行的程序出现了如下错误:sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (1267, "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='"...

Angular 子组件向父组件传值

再Angular经常用到父组件向子组件传值,但是今天需要用到子组件向父组件传值。具体子组件代码如下:import { EventEmitter, Output} from '@angular/core'; export class PanelComponent { private count: number; //准备用它来发射事件 @Output() Notificati...

Typescript declare var

最近看到他人写的代码,使用的是declare var,查了一下文档,对declare定义进行了一些总结:使用declare var声明全局变量。如果变量是只读的(全局),则可以使用declare const。如果declare let变量是块作用域的,也可以使用。参考资料:1、Typescriptlang - Global Variables

在Angular中使用Google Analytics

最近项目进入后期的一些调试阶段,需要统计访客量,使用的是Google Analytics,在Angular中只需要写一个服务,具体内容如下:import {Injectable} from '@angular/core';import {NavigationEnd, Router} from '@angular/router';import {environment} from '../../en...

Ubuntu Redis 配置

最近需要一个测试环境,在Linux上安装Redis,具体安装步骤可以参考这里:redis download,或者是这篇文章:Ubuntu 20.04 安装 Redis安装完成之后,开始编辑/etc/redis/redis.conf文件。之后查找:requirepass,这里是设置密码的地方。同时需要看到上面警告:# Warning: since Redis is pretty fast an ou...

REST API Security

这里有几篇关于REST API Security的一些文章:1、REST API Security Essentials2、开放api接口签名验证,添加sign,时间戳3、企业API接口设计(token、timestamp、sign)之具体实现4、API接口安全性设计5、你的API还在裸奔?一文讲解API攻防问题!