Nothing here yet.
Nothing here yet.
Dec 18, 2024 · 1 min read · How to fix it Just add a rule in lint file. // .eslintrc "rules": { /** ... **/ "tailwindcss/no-custom-classname": "off" }, Why do this? https://github.com/shadcn-ui/ui/blob/ea677cc74eb0b35591e06558af80cfce2c5b926b/.eslintrc.json#L14...
Join discussionOct 29, 2024 · 2 min read · A few days ago, I had a fucking dream that useActionState can use yield to push data. It was probably that state was an array []. Every time data was yielded in the action function, the data would be appended to the state. (It could also be that I se...
Join discussionDec 28, 2022 · 2 min read · 前言 Javascript 整数表达最大为 2^53-1 位,大约是十进制16位,超过就会导致精度丢失,一般在浏览器中会直接报错。 场景 我们知道,雪花算法(SnowFlake)生成的雪花ID是 2^64 位,如果直接使用雪花算法(SnowFlake)生成器,前端是没办法直接拿到int类型的雪花ID,需要后端先将其转换为string类型才行。 使用雪花算法(SnowFlake)的很重要一个原因就是,int类型对数据库索引是很友好的,为了前后端数据交互方便,在数据库中直接储存string类型的雪花...
Join discussionOct 31, 2022 · 1 min read · How to accept a xlsx file and read it using Fastapi, the following is the implementation code. @application.post("/uploadFile/") async def create_upload_file(file: UploadFile): if file.filename.endswith('.xlsx'): # Read it, 'f' type is by...
Join discussion