###haskell 基本类型,bool(True/False),list[],tuple(),int,Integer,Double,char'' ,string"",function(\x->x+1)
- wiki
def get_count(q): | |
count_q = q.statement.with_only_columns([func.count()]).order_by(None) | |
count = q.session.execute(count_q).scalar() | |
return count | |
q = session.query(TestModel).filter(...).order_by(...) | |
# Slow: SELECT COUNT(*) FROM (SELECT ... FROM TestModel WHERE ...) ... | |
print q.count() |
import asyncio | |
import aiomysql | |
from aiomysql.cursors import DictCursor | |
class MysqlWrapper: | |
def __init__(self, host, port, user, password, db): | |
self.host = host | |
self.port = port |
import asyncio | |
async def task(): | |
while True: | |
print('Do something.') | |
await asyncio.sleep(1) | |
async def run(lp): |
#-!-coding:utf-8-!- | |
# schema | |
# revision identifiers, used by Alembic. | |
revision = '507c3af35680' | |
down_revision = None | |
from alembic import op | |
import sqlalchemy as sa |
本文原载于我的独立博客 https://lutaonan.com/blog/effective-graphql-and-antd/
在过去的几年,不论是面向内部的系统,还是面向外部的产品,我们都大量地使用了 Ant.Design —— 一个基于 React 的 UI 组件库。
在做内部系统时,Ant.Design 解决了几乎 60% 的问题。剩下的问题在业务逻辑和代码组织的复杂度。我见过很多内部系统因为滥用状态管理而使代码变得复杂,他们之所以使用状态管理库,并不是因为应用的状态复杂,而是因为需要一个状态树来管理网络请求的状态、接口返回的数据等等这些和接口相关的状态。
真的需要状态管理库吗?在之前,我没有信心回答这个问题。但在使用了 GraphQL (Apollo) 后,我确信,在大多数场景,你不再需要状态管理。
There's a couple of ways, one way is
SPC /
and type in your search stringSPC x S
and search string - where x is your scope indicator (p for project, d for directory, etc..)C-c C-e
inside the helm buffer to put all your match occurences and puts them into a special buffer called the edit buffer or something like thatC-c C-c
to commit your changes.车子相关: | |
头盔 | |
驼包 | |
货架 | |
补胎工具 | |
水杯 | |
内胎 | |
码表 | |
V刹皮 | |
强光手电筒(18650电池也要带几块备用) |
[Unit] | |
Description=supervisord - Supervisor process control system for UNIX | |
Documentation=http://supervisord.org | |
After=network.target | |
[Service] | |
Type=forking | |
ExecStart=/bin/supervisord -c /etc/supervisord/supervisord.conf | |
ExecReload=/bin/supervisorctl reload | |
ExecStop=/bin/supervisorctl shutdown |
Python