04 2022 档案
摘要:目前后端用户认证用了shiro,把session保存在了redis。在部署上去后发现微信上再调用subject.login()之后,重新开一个页面,subject.isAuthenticated()却还是false。但我在微信开发工具里打开网页却是正常,能记住用户。这现象让我不禁怀疑是不是微信端的c
阅读全文
摘要:不少从java或其他后端在写javascript的逻辑与,或容易犯的一个错误是: javascript的&&,||不光返回true,false,还可以是其他字符: 打开chrome的console,在上面打上: >8||7 <-8 >true || 8 <-true >'sss' && true <
阅读全文
摘要:1. python中的变量叫names而不是variables; I use the word attribute for any name following a dot — for example, in the expression z.real, real is an attribute o
阅读全文
摘要:在开发的过程中碰到了一个有趣的问题。看下面这段代码: LOCAL = None try: from local_setting import * except ImportError as e: logging.exception(e) pass # 这里只有线上才会传LOG_FILE print(
阅读全文
摘要:python中的relative import使用起来却有不少问题。 比如下面这样一个结构 crawler |_src_ | |_spiders_ | |_test.py | |_local_settings.py test.py中想import local_settings这个模块,那在test.
阅读全文