Gorm 一对多

笔记  Go 

package mainimport ("fmt""gorm.io/gorm""log")import "gorm.io/driver/mysql"type User struct {gorm.ModelName st

Gorm 一对一关系

笔记  Go 

一对一关系建表package mainimport ("gorm.io/gorm""log")import "gorm.io/driver/mysql"type Student struct {gorm.ModelName

golang sql库简单使用

笔记  Go 

package mainimport ("database/sql""fmt""log"_ "github.com/go-sql-driver/mysql")func main() {dsn := "root:

Golang实现Set

笔记  Go 

Golang实现Setpackage setimport "fmt"type void struct{}type Set struct {m map[any]void}// 创建一个新的集合func NewSet(items ...any) *Set {s := &Set

使用vue-cropper编写头像上传组件

笔记 

使用效果上传api/** * uploadImageApi(File,string) 上传图片 * @param image - File类型,图片文件 * @param string - string 类型,imageType 图片类型 * @returns Promise<baseResp

Vue 子组件向父组件传值

笔记 

Helloworld.vue<template><div> <h1>Helloworld </h1> <button @click="trigEmit">点击触发父组件传来的函数</button> &l

Pyseid6 编写http请求器

笔记 

import sysimport requests.exceptionsfrom PySide6.QtWidgets import QApplication, QMainWindow, QMessageBox, QInputDialog,QTableWidgetItemfrom http_ui im

Mysql 8.0配置-Windows


下载mysql8.0https://cdn.mysql.com//Downloads/MySQL-8.0/mysql-8.0.40-winx64.zip解压改配置文件新建data文件夹新建my.ini[mysqld]default-time_zone = '+8:00'basedir

Go 简易反向代理服务器

笔记  Go 

package mainimport ("fmt""log""net/http""net/http/httputil""net/url""strings")type Proxy s

Java 动态代理

笔记  Java 

SmsServicepackage org.example;public interface SmsService { String send(String message);}SmsServiceImplpackage org.example;public class SmsServiceI