会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
qcy-blog
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
9
10
···
49
下一页
2025年4月29日
go解析json,不区分json字段的大小写
摘要: 有个需求,客户端传来的json的key,可能是password也可能是Password package main import ( "encoding/json" "fmt" "strings" "github.com/mitchellh/mapstructure" ) type LiveData
阅读全文
posted @ 2025-04-29 13:25 朝阳1
阅读(35)
评论(0)
推荐(0)
2025年4月25日
go validator中文翻译
摘要: package services import ( "errors" "fmt" "github.com/go-playground/locales/zh" ut "github.com/go-playground/universal-translator" "github.com/go-playg
阅读全文
posted @ 2025-04-25 10:11 朝阳1
阅读(27)
评论(0)
推荐(0)
2025年1月16日
php根据权重自定义排序
摘要: <?php // 支付列表数组 $paymentList = [ ['name' => '支付宝', 'info' => '支持多种支付场景', 'weight' => 3], ['name' => '微信支付', 'info' => '便捷的移动支付', 'weight' => 2], ['nam
阅读全文
posted @ 2025-01-16 15:05 朝阳1
阅读(29)
评论(0)
推荐(0)
2025年1月15日
diesel操作sqlite
摘要: diesel ={ version = "*", features = ["sqlite", "r2d2"]} diesel_derives = { version = "*", features = ["sqlite"] } lazy_static = "*" [build-dependencie
阅读全文
posted @ 2025-01-15 14:14 朝阳1
阅读(55)
评论(0)
推荐(0)
2025年1月13日
python使用grpc入门
摘要: 安装 protobuf,grpcio,grpcio-tools pip install protobuf pip install grpcio pip install grpcio-tools hello.proto syntax = "proto3"; package proto; // 请求消息
阅读全文
posted @ 2025-01-13 09:43 朝阳1
阅读(136)
评论(0)
推荐(0)
2025年1月10日
Rust 结构体部分字段的可变借用
摘要: 问题复现,假设我们有一个简单的 Point 结构体: struct Point { x: f64, y: f64, } impl Point { pub fn x_mut(&mut self) -> &mut f64 { &mut self.x } pub fn y_mut(&mut self) -
阅读全文
posted @ 2025-01-10 09:55 朝阳1
阅读(66)
评论(0)
推荐(0)
2024年12月25日
Go中的map可以寻址吗?
摘要: 答案:不可 package main import "fmt" func main() { // 创建一个map m := make(map[string]int) // 给map赋值 m["one"] = 1 m["two"] = 2 // 获取map的地址 addressOfM := &m //
阅读全文
posted @ 2024-12-25 17:06 朝阳1
阅读(17)
评论(0)
推荐(0)
简单ddos
摘要: ip+port import tkinter as tk from tkinter import messagebox import socket import threading import time import logging import re import asyncio import
阅读全文
posted @ 2024-12-25 15:48 朝阳1
阅读(40)
评论(0)
推荐(0)
2024年12月19日
解决docker启动失败Failed to start containerd container runtime
摘要: 1:先删除之前的 sudo apt-get purge containerd.io docker-ce rm -rf /var/lib/containerd 2 重启一下 reboot 3 重新安装 sudo apt-get install containerd.io docker-ce
阅读全文
posted @ 2024-12-19 08:55 朝阳1
阅读(1365)
评论(0)
推荐(0)
2024年12月18日
su和sudo的区别
摘要: su 和 sudo 是 Linux 和 Unix 系统中用于权限管理的两个命令,它们的主要区别如下: 1. 功能和用途 su (Switch User): su 命令用于切换用户身份,默认情况下,它会切换到超级用户(root)。 使用 su 时,用户需要输入目标用户的密码。 例如,执行 su 后,系
阅读全文
posted @ 2024-12-18 10:37 朝阳1
阅读(566)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
9
10
···
49
下一页
公告