基于SpringbootShiro实现的CAS单点登录

news2024/10/6 1:34:19

概述

单点登录(Single Sign On,SSO)是一种登录管理机制,主要用于多系统集成,即在多个系统中,用户只需要到一个中央服务器登录一次即可访问这些系统中的任何一个,无须多次登录。常见的例子就是,当我们在淘宝网上登录了之后,如果再访问天猫网的话是不需要再次登录的。

详细

一、运行效果

image.png

image.png

二、实现过程

①、cas单点登录流程图

CAS是SSO的一种实现方式,CAS系统分为服务端与客户端,服务端提供登录认证的功能,客户端需要跳转到服务端进行登录认证,大体流程如下

image.png

②、cas 服务端搭建

CAS 服务端登录需要使用https,在本地我们可以使用 JDK 自带的 keytool 工具生成数字证书,具体流程和配置如下:

a 修改hosts文件,将要配置的CAS服务端域名映射到本地:

127.0.0.1       www.xiaoti.com

b 生成密钥库文件,这里设置密钥库口令,名字与姓氏处填写单点登录服务器的域名(这里是 www.xiaoti.com),其余项可随便填写。654321,设置密钥口令:654321,两者须相同:

c 查看生成的密钥库,输入密钥库密码654321:

keytool -list -keystore localhost.keystore

 

d 生成crt证书文件,输入密钥库密码654321:

keytool -export -alias localhost -keystore localhost.keystore -file localhost.crt

 

e 客户端信任证书,这里需要输入的密码是changeit:

keytool -import -keystore "D:\Program Files\Java\jdk1.8.0_66\jre\lib\security\cacerts" -file localhost.crt -alias localhost

 

f tomcat配置,server.xml配置:

 

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"

           maxThreads="200"

           SSLEnabled="true"

           scheme="https"

           secure="true"

           clientAuth="false"

           sslProtocol="TLS"

           keystoreFile="D:\dev\localhost.keystore"keystorePass="654321" />

 

③、 新建cas服务端项目

CAS已经提供了服务端的基本war包实现,我们只需在其基础上作修改即可,使用maven 的oerlay配置可以通过覆盖的方式来进行修改。

a 新建Maven webapp项目,这里命名为cas-server-demo,引入依赖:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
         <modelVersion>4.0.0</modelVersion>
         <groupId>gdou.laixiaoming</groupId>
         <artifactId>cas-server-demo</artifactId>
         <packaging>war</packaging>
         <version>0.0.1-SNAPSHOT</version>
         <name>cas-server-demo Maven Webapp</name>
         <url>http://maven.apache.org</url>
  
         <properties>
                   <cas.version>5.2.5</cas.version>
         </properties>
  
         <dependencies>
  
                   <dependency>
                            <groupId>org.apereo.cas</groupId>
                            <artifactId>cas-server-webapp</artifactId>
                            <version>${cas.version}</version>
                            <type>war</type>
                            <scope>runtime</scope>
                   </dependency>
  
         </dependencies>
         <build>
                   <finalName>cas</finalName>
                   <plugins>
                            <plugin>
                                     <groupId>org.apache.maven.plugins</groupId>
                                     <artifactId>maven-compiler-plugin</artifactId>
                                     <version>3.1</version>
                                     <configuration>
                                               <source>1.8</source>
                                               <target>1.8</target>
                                     </configuration>
                            </plugin>
                            <plugin>
                                     <groupId>org.apache.maven.plugins</groupId>
                                     <artifactId>maven-war-plugin</artifactId>
                                     <configuration>
                                               <failOnMissingWebXml>false</failOnMissingWebXml>
                                               <warName>cas</warName>
                                               <overlays>
                                                        <overlay>
                                                                 <groupId>org.apereo.cas</groupId>
                                                                 <artifactId>cas-server-webapp</artifactId>
                                                        </overlay>
                                               </overlays>
                                     </configuration>
                            </plugin>
                   </plugins>
  
         </build>
  
</project>

b 打包,选择上面我们配置的tomcat,启动:
浏览器打开https://www.xiaoti.com:8443/cas/login,默认登录名和密码是casuserMellon,输入后可成功登录

④、配置数据库认证

上面我们成功搭建了CAS Server,但是只能使用默认的用户名和密码进行登录,如果我们的用户名和密码是存储在数据库的话,需要引入 JDBC的支持并进行配置:

a 首先,pom.xml配置文件中增加依赖:

<dependency>
                            <groupId>org.apereo.cas</groupId>
                            <artifactId>cas-server-support-jdbc</artifactId>
                            <version>${cas.version}</version>
              </dependency>
              <dependency>
                            <groupId>org.apereo.cas</groupId>
                            <artifactId>cas-server-support-jdbc-drivers</artifactId>
                            <version>${cas.version}</version>
              </dependency>
              <dependency>
                            <groupId>mysql</groupId>
                            <artifactId>mysql-connector-java</artifactId>
                            <version>5.1.36</version>
              </dependency>

b 创建用户密码表:

CREATE TABLE `user` (

  `id` bigint(20) NOT NULL AUTO_INCREMENT,

  `userName` varchar(15) DEFAULT NULL,

  `password` char(32) DEFAULT NULL,

  PRIMARY KEY (`id`)

) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

c 将war包中的的application.properties复制出来:

image.png

放到项目如下位置,这里的路径需要对应(确保部署后的application.properties可以对原文件进行覆盖),才能实现更新:

image.png

d 修改application.properties,关于JDBC这里的更详细的配置,可以访问官网 database-authentication部分:

#数据库连接配置

cas.authn.jdbc.query[0].user=root

cas.authn.jdbc.query[0].password=mysql

cas.authn.jdbc.query[0].driverClass=com.mysql.jdbc.Driver

cas.authn.jdbc.query[0].url=jdbc:mysql://localhost:3306/cas_auth

cas.authn.jdbc.query[0].dialect=org.hibernate.dialect.MySQLDialect

##从数据库中获取用户名和密码进行匹配登录

cas.authn.jdbc.query[0].sql=SELECT * FROM `user` WHERE userName=?

cas.authn.jdbc.query[0].fieldPassword=password

e 重新构建项目并启动,输入数据库中存在的用户名和密码,是可以成功登录的;

⑤、cas服务端搭建(整合Shiro和SpringBoot)

新建maven项目,引入相关依赖

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
         <modelVersion>4.0.0</modelVersion>
         <parent>
                   <groupId>org.springframework.boot</groupId>
                   <artifactId>spring-boot-starter-parent</artifactId>
                   <version>2.1.3.RELEASE</version>
                   <relativePath/> <!-- lookup parent from repository -->
         </parent>
         <groupId>gdou.laixiaoming</groupId>
         <artifactId>cas-client-a</artifactId>
         <version>0.0.1-SNAPSHOT</version>
         <name>cas-client-a</name>
         <description>CAS Client Demo.</description>
  
         <properties>
                   <java.version>1.8</java.version>
                   <shiro.version>1.4.0</shiro.version>
         </properties>
  
         <dependencies>
                   <dependency>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-starter-thymeleaf</artifactId>
                   </dependency>
                   <dependency>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-starter-web</artifactId>
                   </dependency>
  
                   <!-- shiro -->
                   <dependency>
                            <groupId>org.apache.shiro</groupId>
                            <artifactId>shiro-spring</artifactId>
                            <version>${shiro.version}</version>
                   </dependency>
  
                   <dependency>
                            <groupId>org.apache.shiro</groupId>
                            <artifactId>shiro-core</artifactId>
                            <version>${shiro.version}</version>
                   </dependency>
  
                   <dependency>
                            <groupId>org.apache.shiro</groupId>
                            <artifactId>shiro-cas</artifactId>
                            <version>${shiro.version}</version>
                   </dependency>
  
                   <dependency>
                            <groupId>org.apache.shiro</groupId>
                            <artifactId>shiro-aspectj</artifactId>
                            <version>${shiro.version}</version>
                   </dependency>
  
                   <dependency>
                            <groupId>org.springframework.boot</groupId>
                            <artifactId>spring-boot-starter-test</artifactId>
                            <scope>test</scope>
                   </dependency>
         </dependencies>
  
         <build>
                   <plugins>
                            <plugin>
                                     <groupId>org.springframework.boot</groupId>
                                     <artifactId>spring-boot-maven-plugin</artifactId>
                            </plugin>
                   </plugins>
         </build>
  
</project>

shiro配置

扩展CasRealm,在登录成功后,可以获取到登录的用户名,在客户端这边再把用户拥有的角色和权限查询出来并保存:
public class MyCasRealm extends CasRealm{
  
    @Override
    protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
        //获取用户名
        String username = (String)principals.getPrimaryPrincipal();
  
        SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo();
//        authorizationInfo.setRoles(new HashSet<>(Arrays.asList("admin")));
//        authorizationInfo.setStringPermissions(new HashSet<>(Arrays.asList("admin")));
  
        return authorizationInfo;
    }
}
  
Shiro配置:
@Configuration
public class ShiroConfig {
  
    @Bean
    public ShiroFilterFactoryBean shirFilter(SecurityManager securityManager) {
        ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
        shiroFilterFactoryBean.setSecurityManager(securityManager);
  
        //配置自定义casFilter
        Map<String, Filter> filters = new LinkedHashMap<>();
        CasFilter casFilter = new CasFilter();
        casFilter.setFailureUrl("/casFailure");
        filters.put("cas", casFilter);
        shiroFilterFactoryBean.setFilters(filters);
  
        //配置filter调用链
        Map<String,String> filterChainDefinitionMap = new LinkedHashMap<>();
        //anon为匿名,不拦截
        filterChainDefinitionMap.put("/static/**", "anon");
        filterChainDefinitionMap.put("/casFailure", "anon");
        //拦截CAS Server返回的ticket
        filterChainDefinitionMap.put("/cas", "cas");
        //退出登录
        filterChainDefinitionMap.put("/logout", "anon");
        filterChainDefinitionMap.put("/logouttips", "anon");
        //需要登录访问的页面
        filterChainDefinitionMap.put("/**", "user");
        shiroFilterFactoryBean.setFilterChainDefinitionMap(filterChainDefinitionMap);
  
        //service指定了登录成功后的回调地址,回调/cas将被CasFilter拦截,获取服务端返回的Service Ticket进行登录
        shiroFilterFactoryBean.setLoginUrl("https://www.xiaoti.com:8443/cas/login?service=http://www.localhost1.com:9090/cas");
        //登录成功后要跳转的链接
        shiroFilterFactoryBean.setSuccessUrl("/");
        //未授权跳转页面
        shiroFilterFactoryBean.setUnauthorizedUrl("/403");
  
        return shiroFilterFactoryBean;
    }
  
  
    @Bean
    public MyCasRealm casRealm(){
        //使用自定义Realm
        MyCasRealm casRealm = new MyCasRealm();
        casRealm.setCachingEnabled(true);
        casRealm.setAuthenticationCachingEnabled(true);
        casRealm.setAuthenticationCacheName("authenticationCache");
        casRealm.setAuthorizationCachingEnabled(true);
        casRealm.setAuthorizationCacheName("authorizationCache");
        //指定CAS服务端地址
        casRealm.setCasServerUrlPrefix("https://www.xiaoti.com:8443/cas");
        //当前应用的CAS服务URL,用于接收和处理CAS服务端的Ticket
        casRealm.setCasService("http://www.localhost1.com:9090/cas");
        return casRealm;
    }
  
    @Bean
    public SecurityManager securityManager(){
        DefaultWebSecurityManager securityManager =  new DefaultWebSecurityManager();
        securityManager.setRealm(casRealm());
        return securityManager;
    }
  
    /**
     * Shiro生命周期处理器
     */
    @Bean
    public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() {
        return new LifecycleBeanPostProcessor();
    }
  
    @Bean
    @DependsOn({"lifecycleBeanPostProcessor"})
    public DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator() {
        DefaultAdvisorAutoProxyCreator advisorAutoProxyCreator = new DefaultAdvisorAutoProxyCreator();
        advisorAutoProxyCreator.setProxyTargetClass(true);
        return advisorAutoProxyCreator;
    }
  
    /**
     * 开启Shiro AOP的注解支持(如@RequiresRoles,@RequiresPermissions)
     */
    @Bean
    public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager){
        AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor();
        authorizationAttributeSourceAdvisor.setSecurityManager(securityManager);
        return authorizationAttributeSourceAdvisor;
    }
  
}

⑥、cas单点登出配置

退出登录时,将页面重定向到CAS的退出页面,service参数的设置指定了退出登录后的回调地址:

@GetMapping("/logout")
         public String logout(){
                   SecurityUtils.getSubject().logout();
                   return "redirect:https://www.xiaoti.com:8443/cas/logout?service=https://www.xiaoti.com:9090/logouttips";
         }

service参数名可以在CAS服务端通过修改application.properties进行配置,关于登出的更多配置,可见官网:

#单点登出

#配置允许登出后跳转到指定页面

cas.logout.followServiceRedirects=true

#跳转到指定页面需要的参数名为 service

cas.logout.redirectParameter=service

在CAS服务端退出后,会向注册的每个服务发送登出请求,该请求可以由SingleSignOutFilter进行拦截并销毁当前会话:

@Configuration
public class CasConfig {
  
    @Bean
    public FilterRegistrationBean singleSignOutFilterRegistration() {
        FilterRegistrationBean registration = new FilterRegistrationBean(new SingleSignOutFilter());
        registration.addUrlPatterns("/*");
        return registration;
    }
  
    @Bean
    public ServletListenerRegistrationBean<SingleSignOutHttpSessionListener> singleSignOutListenerRegistration() {
        ServletListenerRegistrationBean<SingleSignOutHttpSessionListener> registration =
                new ServletListenerRegistrationBean<>(new SingleSignOutHttpSessionListener());
        return registration;
    }
}

⑥、cas单点登出配置

退出登录时,将页面重定向到CAS的退出页面,service参数的设置指定了退出登录后的回调地址:

@GetMapping("/logout")

         public String logout(){

                   SecurityUtils.getSubject().logout();

                   return "redirect:https://www.xiaoti.com:8443/cas/logout?service=https://www.xiaoti.com:9090/logouttips";

         }

#单点登出

#配置允许登出后跳转到指定页面

cas.logout.followServiceRedirects=true

#跳转到指定页面需要的参数名为 service

cas.logout.redirectParameter=service

在CAS服务端退出后,会向注册的每个服务发送登出请求,该请求可以由SingleSignOutFilter进行拦截并销毁当前会话:

@Configuration

public class CasConfig {

  

    @Bean

    public FilterRegistrationBean singleSignOutFilterRegistration() {

        FilterRegistrationBean registration = new FilterRegistrationBean(new SingleSignOutFilter());

        registration.addUrlPatterns("/*");

        return registration;

    }

  

    @Bean

    public ServletListenerRegistrationBean<SingleSignOutHttpSessionListener> singleSignOutListenerRegistration() {

        ServletListenerRegistrationBean<SingleSignOutHttpSessionListener> registration =

                new ServletListenerRegistrationBean<>(new SingleSignOutHttpSessionListener());

        return registration;

    }

}

⑦、cas服务端配置

客户端搭建好后,需要在CAS服务端上配置哪些服务可以注册到CAS服务端上,服务的管理也有许多方式,这里使用的JSON的方式,需要先在服务端引入相关依赖(更多说明见官网):

<dependency>

                            <groupId>org.apereo.cas</groupId>

                            <artifactId>cas-server-support-json-service-registry</artifactId>

                            <version>${cas.version}</version>

                   </dependency>

然后,在已经生成的war包中找到文件:

image.png

将文件复制到这个位置:

image.png

修改,serviceId指定允许注册的客户端,更多配置见官网:

{

  "@class" : "org.apereo.cas.services.RegexRegisteredService",

  "serviceId" : "^(https|imaps|http)://(www\\.localhost1\\.com:9090|www\\.localhost2\\.com:9091)/.*",

  "name" : "HTTPS and IMAPS",

  "id" : 10000001,

  "description" : "This service definition authorizes all application urls that support HTTPS and IMAPS protocols.",

  "evaluationOrder" : 10000

}

同时在application.properties指定配置文件位置:

#客户端服务注册

cas.serviceRegistry.json.location=classpath:/services

至此,CAS客户端搭建完成了

三、项目结构图

image.png

四、补充

CAS全称为Central Authentication Service即中央认证服务,是一个企业多语言单点登录的解决方案,并努力去成为一个身份验证和授权需求的综合平台。

CAS是由Yale大学发起的一个企业级的、开源的项目,旨在为Web应用系统提供一种可靠的单点登录解决方法(属于 Web SSO )。

CAS协议至少涉及三方:客户端Web浏览器,请求身份验证的Web应用程序和CAS服务器。 它也可能涉及后端服务,如数据库服务器,它没有自己的HTTP接口,但与Web应用程序进行通信。

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

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

相关文章

java 封装一个将String类型转Long类型的函数

Long是一种超大类型的数字变量类型 但java无法直接生成这种数据 但我们可以封装一个函数 public Long getuniid(String number) {Long longNumber Long.parseLong(number);return longNumber; }这样 我们就可以传入一个字符串 然后将其转换为 long 然后我们调用这个函数 Sys…

Linux之ASCII码表查询tools(五十九)

简介&#xff1a; CSDN博客专家&#xff0c;专注Android/Linux系统&#xff0c;分享多mic语音方案、音视频、编解码等技术&#xff0c;与大家一起成长&#xff01; 优质专栏&#xff1a;Audio工程师进阶系列【原创干货持续更新中……】&#x1f680; 人生格言&#xff1a; 人生…

浅谈C++|类的成员

一.类对象作为类成员 类可以作为另一个类的成员 代码&#xff1a; #include <iostream> using namespace std; class phone { public:string shouji;phone(string shouji1) :shouji(shouji1) {cout << "phone的构造函数调用" << endl;}~phone() …

Obsidian配置

插件 1&#xff1a;Annotator pdf批注插件&#xff0c;使用方法&#xff1a;新建一个markdown文件&#xff0c;在文件的头部必须时开头添加以下内容&#xff1a; --- annotation-target: xxx.pdf ---2&#xff1a;Hidden Folder 用正则表达式隐藏文件夹的&#xff0c;我的设…

Spring实例化源码解析(一)

invokeBeanFactoryPostProcessors 前言 AbstractApplicationContext类的refresh方法是spring实例化流程的开始。本章主要是介绍invokeBeanFactoryPostProcessors(beanFactory)方法&#xff0c;对其内部源码进行详细分析。接下来就来看看这句简单的代码后面具体做了什么。Spri…

SpringSecurity学习 - 认证和授权

一般来说中大型的项目都是使用SpringSecurity 来做安全框架。小项目有Shiro的比较多&#xff0c;因为相比与SpringSecurity&#xff0c;Shiro的上手更加的简单。 一般Web应用的需要进行认证和授权。 认证&#xff1a;验证当前访问系统的是不是本系统的用户&#xff0c;并且要…

C语言实现通讯录 (附完整代码)

C语言实现通讯录 &#x1f340;实现一个通讯录&#xff1a;&#x1f340;通讯录的功能&#xff1a;&#x1f340;多文件实现&#x1f4ae;设计结构体——保存人的信息&#x1f4ae;初始通讯录&#x1f4ae;封装通讯录&#x1f4ae;define宏定义修改通讯录的最大容量初始化通讯录…

【机器学习】文本多分类

声明&#xff1a;这只是浅显的一个小试验&#xff0c;且借助了AI。使用的是jupyter notebook,所以代码是一块一块&#xff0c;从上往下执行的 知识点&#xff1a;正则删除除数字和字母外的所有字符、高频词云、混淆矩阵 参考&#xff1a;使用python和sklearn的中文文本多分类…

JDK9特性——语法、API的改变

文章目录 语法层次改变钻石操作符号语法升级try结构语法升级下划线命名标识符的使用限制 API层次的改变接口中的私有方法String底层存储结构变化Stream新增4个APIInputStream新增transferTo方法只读集合创建 语法层次改变 钻石操作符号语法升级 钻石操作符&#xff0c;就是我…

LeetCode(力扣)738. 单调递增的数字Python

LeetCode738. 单调递增的数字 题目链接代码 题目链接 https://leetcode.cn/problems/monotone-increasing-digits/description/ 代码 class Solution:def monotoneIncreasingDigits(self, n: int) -> int:strNum str(n)flag len(strNum)for i in range(len(strNum) - …

ffmpeg6.0编译(NDK)

ffmpeg 6.0 支持vulkan 需要手动安装Vulkan 并将include里面的vk_video 和 vulkan 拷贝到 android-ndk-r25c/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/ vulkan 下载 cp -r vk_video $NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/…

前端vue3分享——项目封装axios、vite使用env环境变量

文章目录 ⭐前言⭐vue3封装统一的axios请求&#x1f496; 请求拦截器 ⭐vue3使用env环境变量&#x1f496; vite env变量规则&#x1f496; vite.config获取env参数 ⭐总结&#x1f496; 编码sliod原则 ⭐结束 ⭐前言 大家好&#xff0c;我是yma16&#xff0c;本文分享关于前端…

iOS开发之编译OpenSSL静态库

项目审查发现OpenSSL1.0.2d有漏洞&#xff0c;所以需要升级更新OpenSSL版本&#xff0c;借此机会&#xff0c;记录一下编译OpenSSL静态库的流程。 Xcode使用的是14.2&#xff0c;OpenSSL使用的是1.0.2u、1.1.1u&#xff0c;由于是对两个不同版本进行的编译操作&#xff0c;所以…

企业架构LNMP学习笔记55

MongoDB的安装和配置&#xff1a; 1、安装方式介绍&#xff1a; yum安装方式&#xff1a; 手动通用安装方式&#xff1a; 2、二进制可执行安装&#xff1a; 下载路径&#xff1a;Download MongoDB Community Server | MongoDB 下载mongodb的源码包进行安装。 1&#xff09;…

220kV 及以下避雷器直流泄露电流试验

试验步骤: 1) 记录试验现场的环境温度、 湿度。 2) 对被试设备充分放电后可靠接地。 3) 试验前正确设置安全围栏和悬挂标示牌。 4) 做上节避雷器直流试验时, 根据图进行试验接线, 微安表的一端夹子接在上节避雷器的下端, 另一端安装在高压直流发生器的电压输出端, 上节避雷…

cgroup限制内存

首先简单介绍下cgroup限制cpu的使用率&#xff0c;写一段代码如下&#xff1a; #include <stdio.h> #include <pthread.h>int main() { int i 0; for(;;)i; return 0; }很明显&#xff0c;这里面是单核拉满&#xff0c;然后top看下进程的cpu使用率&#xff0c;如…

【深度学习】Pytorch 系列教程(十四):PyTorch数据结构:6、模块(Module):前向传播

目录 一、前言 二、实验环境 三、PyTorch数据结构 0、分类 1、张量&#xff08;Tensor&#xff09; 2、张量操作&#xff08;Tensor Operations&#xff09; 3、变量&#xff08;Variable&#xff09; 4、数据集&#xff08;Dataset&#xff09; 5、数据加载器&#x…

科学计算器网站Desmos网站

科学计算器网站Desmos网站 有时在学习工作或者生活中&#xff0c;需要用到计算问题&#xff0c;但由于电脑上没有安装相应的专业软件&#xff0c;难以计算有的问题&#xff0c;因而&#xff0c;本文推荐一种免费的在线计算网站Desmos。 一、Desmos网址 Desmos官网的地址为&a…

[管理与领导-96]:IT基层管理者 - 扩展技能 - 5 - 职场丛林法则 -10- 七分做,三分讲,完整汇报工作的艺术

目录 前言&#xff1a; 一、汇报工作的重要性 1.1 汇报的重要性&#xff1a;汇报工作是工作重要的一环 1.2 向上司汇报工作状态具有重要的意义 1.2 汇报工作存在一些误解 1.3 汇报工作中的下错误做法 1.4 汇报工作与做实际工作的关系 二、工作汇报的内容与艺术 2.1 工…

【深度学习】- NLP系列文章之 1.文本表示以及mlp来处理分类问题

系列文章目录 1. 文本分类与词嵌入表示&#xff0c;mlp来处理分类问题 2. RNN、LSTM、GRU三种方式处理文本分类问题 3. 评论情绪分类 还是得开个坑&#xff0c;最近搞论文&#xff0c;使用lstm做的ssd的cache prefetching&#xff0c;意味着我不能再划水了。 文章目录 系列文章…