Springboot+Vue项目-基于Java+MySQL的民族婚纱预定系统(附源码+演示视频+LW)

news2024/9/23 19:21:15

大家好!我是程序猿老A,感谢您阅读本文,欢迎一键三连哦。

💞当前专栏:Java毕业设计

精彩专栏推荐👇🏻👇🏻👇🏻

🎀 Python毕业设计
🌎微信小程序毕业设计

开发环境

开发语言:Java
框架:Springboot+Vue
JDK版本:JDK1.8
服务器:tomcat7
数据库:mysql 5.7
数据库工具:Navicat12
开发软件:eclipse/myeclipse/idea
Maven包:Maven3.3.9
浏览器:谷歌浏览器

演示视频

springboot264基于JAVA的民族婚纱预定系统录像

原版高清演示视频-编号264:
https://pan.quark.cn/s/5cda95b17ee0

源码下载地址:

https://download.csdn.net/download/2301_76953549/89100200

LW目录

【如需全文请按文末获取联系】
在这里插入图片描述
在这里插入图片描述

目录

  • 开发环境
  • 演示视频
  • 源码下载地址:
  • LW目录
  • 一、项目简介
  • 二、系统设计
    • 2.1软件功能模块设计
    • 2.2数据库设计
  • 三、系统项目部分截图
    • 3.1摄影师列表
    • 3.2公告信息管理
    • 3.3公告类型管理
  • 四、部分核心代码
    • 4.1 用户部分
  • 获取源码或论文

一、项目简介

管理员管理字典管理、公告管理、作品管理、作品收藏管理、作品留言管理、摄影师收藏管理、摄影师评价管理、摄影师留言管理、摄影师预约管理、用户管理、摄影师管理、管理员管理等功能。

二、系统设计

2.1软件功能模块设计

在分析并得出使用者对程序的功能要求时,就可以进行程序设计了。如图4.3展示的就是管理员功能结构图,管理员在后台主要管理字典管理、公告管理、作品管理、作品收藏管理、作品留言管理、摄影师收藏管理、摄影师评价管理、摄影师留言管理、摄影师预约管理、用户管理、摄影师管理、管理员管理等。

在这里插入图片描述

2.2数据库设计

(1)下图是作品收藏实体和其具备的属性。
在这里插入图片描述
(3)下图是摄影师收藏实体和其具备的属性。
在这里插入图片描述
(5)下图是作品留言实体和其具备的属性。
在这里插入图片描述

(6)下图是摄影师评价实体和其具备的属性。
在这里插入图片描述
(9)下图是摄影师预约实体和其具备的属性。
在这里插入图片描述

三、系统项目部分截图

3.1摄影师列表

如图5.1显示的就是摄影师列表页面,此页面提供给管理员的功能有:查看摄影师、新增摄影师、修改摄影师、删除摄影师等。
在这里插入图片描述

3.2公告信息管理

公告信息管理页面提供的功能操作有:新增公告,修改公告,删除公告操作。下图就是公告信息管理页面。
在这里插入图片描述

3.3公告类型管理

公告类型管理页面显示所有公告类型,在此页面既可以让管理员添加新的公告信息类型,也能对已有的公告类型信息执行编辑更新,失效的公告类型信息也能让管理员快速删除。下图就是公告类型管理页面。
在这里插入图片描述

四、部分核心代码

4.1 用户部分


package com.controller;

import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;

import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;

/**
 * 摄影师
 * 后端接口
 * @author
 * @email
*/
@RestController
@Controller
@RequestMapping("/sheyingshi")
public class SheyingshiController {
    private static final Logger logger = LoggerFactory.getLogger(SheyingshiController.class);

    @Autowired
    private SheyingshiService sheyingshiService;


    @Autowired
    private TokenService tokenService;
    @Autowired
    private DictionaryService dictionaryService;

    //级联表service

    @Autowired
    private YonghuService yonghuService;


    /**
    * 后端列表
    */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永不会进入");
        else if("用户".equals(role))
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        else if("摄影师".equals(role))
            params.put("sheyingshiId",request.getSession().getAttribute("userId"));
        if(params.get("orderBy")==null || params.get("orderBy")==""){
            params.put("orderBy","id");
        }
        PageUtils page = sheyingshiService.queryPage(params);

        //字典表数据转换
        List<SheyingshiView> list =(List<SheyingshiView>)page.getList();
        for(SheyingshiView c:list){
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(c, request);
        }
        return R.ok().put("data", page);
    }

    /**
    * 后端详情
    */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id, HttpServletRequest request){
        logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        SheyingshiEntity sheyingshi = sheyingshiService.selectById(id);
        if(sheyingshi !=null){
            //entity转view
            SheyingshiView view = new SheyingshiView();
            BeanUtils.copyProperties( sheyingshi , view );//把实体数据重构到view中

            //修改对应字典表字段
            dictionaryService.dictionaryConvert(view, request);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody SheyingshiEntity sheyingshi, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,sheyingshi:{}",this.getClass().getName(),sheyingshi.toString());

        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永远不会进入");

        Wrapper<SheyingshiEntity> queryWrapper = new EntityWrapper<SheyingshiEntity>()
            .eq("username", sheyingshi.getUsername())
            .or()
            .eq("sheyingshi_phone", sheyingshi.getSheyingshiPhone())
            .or()
            .eq("sheyingshi_id_number", sheyingshi.getSheyingshiIdNumber())
            ;

        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        SheyingshiEntity sheyingshiEntity = sheyingshiService.selectOne(queryWrapper);
        if(sheyingshiEntity==null){
            sheyingshi.setCreateTime(new Date());
            sheyingshi.setPassword("123456");
            sheyingshiService.insert(sheyingshi);
            return R.ok();
        }else {
            return R.error(511,"账户或者摄影师手机号或者摄影师身份证号已经被使用");
        }
    }

    /**
    * 后端修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody SheyingshiEntity sheyingshi, HttpServletRequest request){
        logger.debug("update方法:,,Controller:{},,sheyingshi:{}",this.getClass().getName(),sheyingshi.toString());

        String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");
        //根据字段查询是否有相同数据
        Wrapper<SheyingshiEntity> queryWrapper = new EntityWrapper<SheyingshiEntity>()
            .notIn("id",sheyingshi.getId())
            .andNew()
            .eq("username", sheyingshi.getUsername())
            .or()
            .eq("sheyingshi_phone", sheyingshi.getSheyingshiPhone())
            .or()
            .eq("sheyingshi_id_number", sheyingshi.getSheyingshiIdNumber())
            ;

        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        SheyingshiEntity sheyingshiEntity = sheyingshiService.selectOne(queryWrapper);
        if("".equals(sheyingshi.getSheyingshiPhoto()) || "null".equals(sheyingshi.getSheyingshiPhoto())){
                sheyingshi.setSheyingshiPhoto(null);
        }
        if(sheyingshiEntity==null){
            sheyingshiService.updateById(sheyingshi);//根据id更新
            return R.ok();
        }else {
            return R.error(511,"账户或者摄影师手机号或者摄影师身份证号已经被使用");
        }
    }



    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        sheyingshiService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }


    /**
     * 批量上传
     */
    @RequestMapping("/batchInsert")
    public R save( String fileName, HttpServletRequest request){
        logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
        Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        try {
            List<SheyingshiEntity> sheyingshiList = new ArrayList<>();//上传的东西
            Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
            Date date = new Date();
            int lastIndexOf = fileName.lastIndexOf(".");
            if(lastIndexOf == -1){
                return R.error(511,"该文件没有后缀");
            }else{
                String suffix = fileName.substring(lastIndexOf);
                if(!".xls".equals(suffix)){
                    return R.error(511,"只支持后缀为xls的excel文件");
                }else{
                    URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
                    File file = new File(resource.getFile());
                    if(!file.exists()){
                        return R.error(511,"找不到上传文件,请联系管理员");
                    }else{
                        List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
                        dataList.remove(0);//删除第一行,因为第一行是提示
                        for(List<String> data:dataList){
                            //循环
                            SheyingshiEntity sheyingshiEntity = new SheyingshiEntity();
//                            sheyingshiEntity.setUsername(data.get(0));                    //账户 要改的
//                            //sheyingshiEntity.setPassword("123456");//密码
//                            sheyingshiEntity.setSheyingshiUuidNumber(data.get(0));                    //摄影师工号 要改的
//                            sheyingshiEntity.setSheyingshiName(data.get(0));                    //摄影师姓名 要改的
//                            sheyingshiEntity.setSheyingshiPhone(data.get(0));                    //摄影师手机号 要改的
//                            sheyingshiEntity.setSheyingshiIdNumber(data.get(0));                    //摄影师身份证号 要改的
//                            sheyingshiEntity.setSheyingshiPhoto("");//详情和图片
//                            sheyingshiEntity.setSheyingshiShanchang(data.get(0));                    //摄影师擅长 要改的
//                            sheyingshiEntity.setSheyingshiDingjin(data.get(0));                    //摄影师预约定金 要改的
//                            sheyingshiEntity.setSheyingshiJiage(data.get(0));                    //摄影价格/次 要改的
//                            sheyingshiEntity.setSexTypes(Integer.valueOf(data.get(0)));   //性别 要改的
//                            sheyingshiEntity.setSheyingshiEmail(data.get(0));                    //电子邮箱 要改的
//                            sheyingshiEntity.setSheyingshiContent("");//详情和图片
//                            sheyingshiEntity.setCreateTime(date);//时间
                            sheyingshiList.add(sheyingshiEntity);


                            //把要查询是否重复的字段放入map中
                                //账户
                                if(seachFields.containsKey("username")){
                                    List<String> username = seachFields.get("username");
                                    username.add(data.get(0));//要改的
                                }else{
                                    List<String> username = new ArrayList<>();
                                    username.add(data.get(0));//要改的
                                    seachFields.put("username",username);
                                }
                                //摄影师工号
                                if(seachFields.containsKey("sheyingshiUuidNumber")){
                                    List<String> sheyingshiUuidNumber = seachFields.get("sheyingshiUuidNumber");
                                    sheyingshiUuidNumber.add(data.get(0));//要改的
                                }else{
                                    List<String> sheyingshiUuidNumber = new ArrayList<>();
                                    sheyingshiUuidNumber.add(data.get(0));//要改的
                                    seachFields.put("sheyingshiUuidNumber",sheyingshiUuidNumber);
                                }
                                //摄影师手机号
                                if(seachFields.containsKey("sheyingshiPhone")){
                                    List<String> sheyingshiPhone = seachFields.get("sheyingshiPhone");
                                    sheyingshiPhone.add(data.get(0));//要改的
                                }else{
                                    List<String> sheyingshiPhone = new ArrayList<>();
                                    sheyingshiPhone.add(data.get(0));//要改的
                                    seachFields.put("sheyingshiPhone",sheyingshiPhone);
                                }
                                //摄影师身份证号
                                if(seachFields.containsKey("sheyingshiIdNumber")){
                                    List<String> sheyingshiIdNumber = seachFields.get("sheyingshiIdNumber");
                                    sheyingshiIdNumber.add(data.get(0));//要改的
                                }else{
                                    List<String> sheyingshiIdNumber = new ArrayList<>();
                                    sheyingshiIdNumber.add(data.get(0));//要改的
                                    seachFields.put("sheyingshiIdNumber",sheyingshiIdNumber);
                                }
                        }

                        //查询是否重复
                         //账户
                        List<SheyingshiEntity> sheyingshiEntities_username = sheyingshiService.selectList(new EntityWrapper<SheyingshiEntity>().in("username", seachFields.get("username")));
                        if(sheyingshiEntities_username.size() >0 ){
                            ArrayList<String> repeatFields = new ArrayList<>();
                            for(SheyingshiEntity s:sheyingshiEntities_username){
                                repeatFields.add(s.getUsername());
                            }
                            return R.error(511,"数据库的该表中的 [账户] 字段已经存在 存在数据为:"+repeatFields.toString());
                        }
                         //摄影师工号
                        List<SheyingshiEntity> sheyingshiEntities_sheyingshiUuidNumber = sheyingshiService.selectList(new EntityWrapper<SheyingshiEntity>().in("sheyingshi_uuid_number", seachFields.get("sheyingshiUuidNumber")));
                        if(sheyingshiEntities_sheyingshiUuidNumber.size() >0 ){
                            ArrayList<String> repeatFields = new ArrayList<>();
                            for(SheyingshiEntity s:sheyingshiEntities_sheyingshiUuidNumber){
                                repeatFields.add(s.getSheyingshiUuidNumber());
                            }
                            return R.error(511,"数据库的该表中的 [摄影师工号] 字段已经存在 存在数据为:"+repeatFields.toString());
                        }
                         //摄影师手机号
                        List<SheyingshiEntity> sheyingshiEntities_sheyingshiPhone = sheyingshiService.selectList(new EntityWrapper<SheyingshiEntity>().in("sheyingshi_phone", seachFields.get("sheyingshiPhone")));
                        if(sheyingshiEntities_sheyingshiPhone.size() >0 ){
                            ArrayList<String> repeatFields = new ArrayList<>();
                            for(SheyingshiEntity s:sheyingshiEntities_sheyingshiPhone){
                                repeatFields.add(s.getSheyingshiPhone());
                            }
                            return R.error(511,"数据库的该表中的 [摄影师手机号] 字段已经存在 存在数据为:"+repeatFields.toString());
                        }
                         //摄影师身份证号
                        List<SheyingshiEntity> sheyingshiEntities_sheyingshiIdNumber = sheyingshiService.selectList(new EntityWrapper<SheyingshiEntity>().in("sheyingshi_id_number", seachFields.get("sheyingshiIdNumber")));
                        if(sheyingshiEntities_sheyingshiIdNumber.size() >0 ){
                            ArrayList<String> repeatFields = new ArrayList<>();
                            for(SheyingshiEntity s:sheyingshiEntities_sheyingshiIdNumber){
                                repeatFields.add(s.getSheyingshiIdNumber());
                            }
                            return R.error(511,"数据库的该表中的 [摄影师身份证号] 字段已经存在 存在数据为:"+repeatFields.toString());
                        }
                        sheyingshiService.insertBatch(sheyingshiList);
                        return R.ok();
                    }
                }
            }
        }catch (Exception e){
            e.printStackTrace();
            return R.error(511,"批量插入数据异常,请联系管理员");
        }
    }


    /**
    * 登录
    */
    @IgnoreAuth
    @RequestMapping(value = "/login")
    public R login(String username, String password, String captcha, HttpServletRequest request) {
        SheyingshiEntity sheyingshi = sheyingshiService.selectOne(new EntityWrapper<SheyingshiEntity>().eq("username", username));
        if(sheyingshi==null || !sheyingshi.getPassword().equals(password))
            return R.error("账号或密码不正确");
        //  // 获取监听器中的字典表
        // ServletContext servletContext = ContextLoader.getCurrentWebApplicationContext().getServletContext();
        // Map<String, Map<Integer, String>> dictionaryMap= (Map<String, Map<Integer, String>>) servletContext.getAttribute("dictionaryMap");
        // Map<Integer, String> role_types = dictionaryMap.get("role_types");
        // role_types.get(.getRoleTypes());
        String token = tokenService.generateToken(sheyingshi.getId(),username, "sheyingshi", "摄影师");
        R r = R.ok();
        r.put("token", token);
        r.put("role","摄影师");
        r.put("username",sheyingshi.getSheyingshiName());
        r.put("tableName","sheyingshi");
        r.put("userId",sheyingshi.getId());
        return r;
    }

    /**
    * 注册
    */
    @IgnoreAuth
    @PostMapping(value = "/register")
    public R register(@RequestBody SheyingshiEntity sheyingshi){
//    	ValidatorUtils.validateEntity(user);
        Wrapper<SheyingshiEntity> queryWrapper = new EntityWrapper<SheyingshiEntity>()
            .eq("username", sheyingshi.getUsername())
            .or()
            .eq("sheyingshi_phone", sheyingshi.getSheyingshiPhone())
            .or()
            .eq("sheyingshi_id_number", sheyingshi.getSheyingshiIdNumber())
            ;
        SheyingshiEntity sheyingshiEntity = sheyingshiService.selectOne(queryWrapper);
        if(sheyingshiEntity != null)
            return R.error("账户或者摄影师手机号或者摄影师身份证号已经被使用");
        sheyingshi.setCreateTime(new Date());
        sheyingshiService.insert(sheyingshi);
        return R.ok();
    }

    /**
     * 重置密码
     */
    @GetMapping(value = "/resetPassword")
    public R resetPassword(Integer  id){
        SheyingshiEntity sheyingshi = new SheyingshiEntity();
        sheyingshi.setPassword("123456");
        sheyingshi.setId(id);
        sheyingshiService.updateById(sheyingshi);
        return R.ok();
    }


    /**
     * 忘记密码
     */
    @IgnoreAuth
    @RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request) {
        SheyingshiEntity sheyingshi = sheyingshiService.selectOne(new EntityWrapper<SheyingshiEntity>().eq("username", username));
        if(sheyingshi!=null){
            sheyingshi.setPassword("123456");
            boolean b = sheyingshiService.updateById(sheyingshi);
            if(!b){
               return R.error();
            }
        }else{
           return R.error("账号不存在");
        }
        return R.ok();
    }


    /**
    * 获取用户的session用户信息
    */
    @RequestMapping("/session")
    public R getCurrSheyingshi(HttpServletRequest request){
        Integer id = (Integer)request.getSession().getAttribute("userId");
        SheyingshiEntity sheyingshi = sheyingshiService.selectById(id);
        if(sheyingshi !=null){
            //entity转view
            SheyingshiView view = new SheyingshiView();
            BeanUtils.copyProperties( sheyingshi , view );//把实体数据重构到view中

            //修改对应字典表字段
            dictionaryService.dictionaryConvert(view, request);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }
    }


    /**
    * 退出
    */
    @GetMapping(value = "logout")
    public R logout(HttpServletRequest request) {
        request.getSession().invalidate();
        return R.ok("退出成功");
    }




    /**
    * 前端列表
    */
    @IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));

        // 没有指定排序字段就默认id倒序
        if(StringUtil.isEmpty(String.valueOf(params.get("orderBy")))){
            params.put("orderBy","id");
        }
        PageUtils page = sheyingshiService.queryPage(params);

        //字典表数据转换
        List<SheyingshiView> list =(List<SheyingshiView>)page.getList();
        for(SheyingshiView c:list)
            dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
        return R.ok().put("data", page);
    }

    /**
    * 前端详情
    */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id, HttpServletRequest request){
        logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        SheyingshiEntity sheyingshi = sheyingshiService.selectById(id);
            if(sheyingshi !=null){


                //entity转view
                SheyingshiView view = new SheyingshiView();
                BeanUtils.copyProperties( sheyingshi , view );//把实体数据重构到view中

                //修改对应字典表字段
                dictionaryService.dictionaryConvert(view, request);
                return R.ok().put("data", view);
            }else {
                return R.error(511,"查不到数据");
            }
    }


    /**
    * 前端保存
    */
    @RequestMapping("/add")
    public R add(@RequestBody SheyingshiEntity sheyingshi, HttpServletRequest request){
        logger.debug("add方法:,,Controller:{},,sheyingshi:{}",this.getClass().getName(),sheyingshi.toString());
        Wrapper<SheyingshiEntity> queryWrapper = new EntityWrapper<SheyingshiEntity>()
            .eq("username", sheyingshi.getUsername())
            .or()
            .eq("sheyingshi_phone", sheyingshi.getSheyingshiPhone())
            .or()
            .eq("sheyingshi_id_number", sheyingshi.getSheyingshiIdNumber())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        SheyingshiEntity sheyingshiEntity = sheyingshiService.selectOne(queryWrapper);
        if(sheyingshiEntity==null){
            sheyingshi.setCreateTime(new Date());
        sheyingshi.setPassword("123456");
        sheyingshiService.insert(sheyingshi);
            return R.ok();
        }else {
            return R.error(511,"账户或者摄影师手机号或者摄影师身份证号已经被使用");
        }
    }


}

获取源码或论文

如需对应的LW或源码,以及其他定制需求,也可以点我头像查看个人简介联系。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1678211.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Stable Diffusion入门使用技巧及个人实例分享--大模型及lora篇

大家好&#xff0c;近期使用Stable Diffusion比较多&#xff0c;积累整理了一些内容&#xff0c;得空分享给大家。如果你近期正好在关注AI绘画领域&#xff0c;可以看看哦。 本文比较适合已经解决了安装问题&#xff0c;&#xff08;没有安装的在文末领取&#xff09; 在寻找合…

线性/非线性最小二乘 与 牛顿/高斯牛顿/LM 原理及算法

最小二乘分为线性最小二乘和非线性最小二乘 最小二乘目标函数都是min ||f(x)||2 若f(x) ax b&#xff0c;就是线性最小二乘&#xff1b;若f(x) ax2 b / ax2 bx 之类的&#xff0c;就是非线性最小二乘&#xff1b; 1. 求解线性最小二乘 【参考】 2. 求解非线性最小二乘…

nn.BatchNorm中affine参数的作用

在PyTorch的nn.BatchNorm2d中&#xff0c;affine参数决定是否在批归一化&#xff08;Batch Normalization&#xff09;过程中引入可学习的缩放和平移参数。 BN层的公式如下&#xff0c; affine参数决定是否在批归一化之后应用一个可学习的线性变换&#xff0c;即缩放和平移。具…

阿里云域名备案流程

阿里云域名备案流程大致可以分为以下几个步骤&#xff0c;这些信息综合了不同来源的最新流程说明&#xff0c;确保了流程的时效性和准确性&#xff1a; UP贴心的附带了链接&#xff1a; 首次备案流程&#xff1a;ICP首次备案_备案(ICP Filing)-阿里云帮助中心 (aliyun.com) …

现实投资者怎么摆脱伦敦银波动影响?

有伦敦银投资经验的朋友会发现&#xff0c;即便自己找到了伦敦银市场的趋势&#xff0c;但是总是没办法坚守自己的仓位&#xff0c;因为没办法摆脱伦敦银波动的影响&#xff0c;比方说在上升趋势中买入后&#xff0c;投资者总是是觉得伦敦银价格会反转下跌&#xff0c;所以他就…

Java(二)——方法与数组

文章目录 方法与数组方法方法的定义方法的执行实参与形参方法重载方法签名 数组创建与初始化数组的类型数组应用转字符串排序查找&#xff08;二分&#xff09;填充拷贝判等 二维数组创建及初始化遍历本质和内存分布不规则二维数组 方法与数组 方法 什么是方法&#xff1f; …

Kubernetes二进制(单master)部署

文章目录 Kubernetes二进制&#xff08;单master&#xff09;部署一、常见的K8S部署方式1. Minikube2. Kubeadmin3. 二进制安装部署4. 小结 二、K8S单&#xff08;Master&#xff09;节点二进制部署1. 环境准备1.1 服务器配置1.2 关闭防火墙1.3 修改主机名1.4 关闭swap1.5 在/e…

【管理咨询宝藏103】麦肯锡咨询顾问逻辑结构内部培训

本报告首发于公号“管理咨询宝藏”&#xff0c;如需阅读完整版报告内容&#xff0c;请查阅公号“管理咨询宝藏”。 【管理咨询宝藏103】麦肯锡咨询顾问逻辑结构内部培训 【格式】PDF版本 【关键词】麦肯锡、咨询顾问、逻辑培训 【核心观点】 - 所谓逻辑性&#xff0c;指的是“…

【数据结构】栈的实现(顺序栈)

文章目录 栈的概念和结构栈的实现1.顺序存储结构栈的定义初始化栈入栈出栈获取栈顶元素获取栈中有效元素个数检测栈是否为空&#xff0c;如果为空返回非零结果&#xff0c;如果不为空返回0销毁栈栈的打印 完整代码&#xff08;包括测试代码&#xff09;Stack.hStack.ctest.c 栈…

控制状态流程图中的消息活动

消息是一个Stateflow对象&#xff0c;用于在本地或图表之间进行数据通信。从发件人图表中&#xff0c;您可以发送或转发邮件。在接收图表中&#xff0c;队列接收消息并将其保存&#xff0c;直到图表能够对其进行评估。 使用Stateflow运算符&#xff0c;您可以访问消息数据&…

更高效的数据交互实现丨 DolphinDB Arrow 插件使用教程

Apache Arrow 是一种跨语言的内存数据交换格式&#xff0c;旨在为用户提供高效的数据结构&#xff0c;以实现在不同的数据处理系统之间共享数据而无需进行复制。它由 Apache 软件基金会开发和维护&#xff0c;目前已经成为许多大型数据处理和分析框架的核心组件之一。在分布式框…

2024年【金属非金属矿山(露天矿山)安全管理人员】模拟考试题库及金属非金属矿山(露天矿山)安全管理人员作业模拟考试

题库来源&#xff1a;安全生产模拟考试一点通公众号小程序 金属非金属矿山&#xff08;露天矿山&#xff09;安全管理人员模拟考试题库参考答案及金属非金属矿山&#xff08;露天矿山&#xff09;安全管理人员考试试题解析是安全生产模拟考试一点通题库老师及金属非金属矿山&a…

DiskGenius帮你恢复系统无法识别的U盘数据

场景还原 前两天早上U盘复制文件卡死后&#xff0c;强行断开U盘&#xff0c;再次使用直接无法访问&#xff0c;心拔凉拔凉&#xff01;&#xff01; 使用驱动器G:中的光盘之前需要将其格式化 位置不可用-无法访问U盘 常规科普 一、U盘无法识别 1、检查U盘是否插入正确&…

【Pytorch】torch.nn.MaxPool2d

什么是MaxPool2d 是对二维矩阵进行池化层下采样的方法 MaxPool2d的用法 相较于卷积层&#xff0c;多出来的参数为ceil_mode 这个参数代表&#xff0c;如果所剩的部分不够卷积核的大小&#xff0c;要不要进行池化操作 具体代码为 import torch import torchvision from torch …

代购系统搭建,淘宝、1688海外代购系统建设以及部分前端源码展示

客户登录主界面&#xff0c;可以根据个人需求更换。 可支持个人定制模块化&#xff0c;也有一些模块可供选择 系统演示站测试 部分源码展示&#xff1a; <!DOCTYPE html> <html><head><meta charset"utf-8"> <title>会员中心 – 淘…

分布式搜索——ElasticSeach简介

一般都用数据库存储数据&#xff0c;然后对数据库进行查询获取数据&#xff0c;但是当数据量很大时&#xff0c;查询效率就会很慢&#xff08;具体下面会讲到&#xff09;&#xff0c;所以这种情况下就会使用到ElasticSeach ElasticSeach的基本介绍 ElasticSeach是一 款非常强…

RSC6218A LLC谐振电源案例分享-REASUNOS(瑞森半导体)

一、前言 RSC6218A是一款可以满足4项标准的优秀产品&#xff1a;①2024年8月1日要实施的《建筑照明设计标准》GBT0034-2024&#xff1b;②2024年07月01日起实施的《电磁兼容限值 第1部分&#xff1a;谐波电流发射限值&#xff08;设备每相输入电流≤16A&#xff09;》GB17625.…

在PyQt5中实现点击按钮打开新窗口功能—窗口的跳转功能实现

百度搜索“pyqt5中如何点击按钮打开新的窗口”&#xff0c;自动生成以下参考代码。 在PyQt5中&#xff0c;要实现点击按钮打开新窗口&#xff0c;你需要定义一个新的窗口类&#xff0c;并在按钮的点击信号&#xff08;clicked&#xff09;处理函数中创建并显示这个新窗口。以下…

继承的奥秘:面向对象编程中的血脉传承与智慧抉择

1. 概述 在面向对象编程&#xff08;OOP&#xff09;中&#xff0c;继承是构建复杂软件系统的基石之一。它允许我们定义一个类&#xff08;称为父类或基类&#xff09;作为其他类&#xff08;称为子类或派生类&#xff09;的基础&#xff0c;子类能够自动获得父类的属性和方法…

jQuery EasyUI textbox 值取不到问题

用textbox 存值点击修改的时候有些字段是不能更改的所以将textbox 的disabled属性设为true后 像这里的textbox disabled属性设为true是灰的 点击保存时这两个值没传 我们可以在提交保存前先将disabled属性先设为false,保存后又设为true