HashMap常用的API

news2024/7/6 19:49:14

HashMap好用的API

isEmpty()和clear()

例子

package com.example.springbootdemo;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;

/**
 * @Author yimeng
 * @Date 2024/4/26 9:27
 * @PackageName:com.example.springbootdemo
 * @ClassName: HashMapMethodTest
 * @Description: TODO
 * @Version 1.0
 */
@SpringBootTest
public class HashMapMethodTest {
    @Test
    void test() {
        HashMap<Integer, String> sites = new HashMap<>();
        // 检查该 HashMap 是否含有元素
        boolean result = sites.isEmpty();
        System.out.println("是否为空? " + result);// 输出:否为空? true

        // 往 HashMap 添加一些元素
        sites.put(1, "Google");
        sites.put(2, "Jiyik");
        sites.put(3, "Taobao");
        System.out.println("HashMap: " + sites);// 输出:HashMap: {1=Google, 2=Jiyik, 3=Taobao}

        result = sites.isEmpty();
        System.out.println("是否为空? " + result);// 输出:否为空? false
        sites.clear();// 相当于是把 HashMap 中的所有元素都移除了,size变为0
        System.out.println("清空 HashMap 后,是否为空? " + sites.isEmpty());// 输出:清空 HashMap 后,是否为空? true
    }
}

源码分析

clear()把HashMap中内容清空,并且长度变为0

在这里插入图片描述

isEmpty()判断size是否为0

在这里插入图片描述

putIfAbsent()

putIfAbsent() 方法会先判断指定的键(key)是否存在,不存在则将键/值对插入到 HashMap 中,存在,那么就不会进行任何操作。如果所指定的 key 已经在 HashMap 中存在,返回和这个 key 值对应的 value,如果所指定的 key 不在 HashMap 中存在,则返回 null。如果指定 key 之前已经和一个 null 值相关联了 ,则该方法也返回 null。

例子

package com.example.springbootdemo;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;

/**
 * @Author yimeng
 * @Date 2024/4/26 9:27
 * @PackageName:com.example.springbootdemo
 * @ClassName: HashMapMethodTest
 * @Description: TODO
 * @Version 1.0
 */
@SpringBootTest
public class HashMapMethodTest {
    @Test
    void test() {
        // 创建一个 HashMap
        HashMap<Integer, String> sites = new HashMap<>();

        // 往 HashMap 添加一些元素
        sites.put(1, "Google");
        sites.put(2, "Jiyik");
        sites.put(3, "Taobao");

        System.out.println("sites HashMap: " + sites);// 输出:sites HashMap: {1=Google, 2=Jiyik, 3=Taobao}


        // 知识点1:HashMap 不存在该key。返回null。
        System.out.println(sites.putIfAbsent(4, "Weibo"));// 输出:null
        // 知识点2:HashMap 不存在该key。会进行插入。
        System.out.println("Insert Languages: " + sites);// 输出:Insert Languages: {1=Google, 2=Jiyik, 3=Taobao, 4=Weibo}

        // HashMap 中存在 Key。key 为 2 已经存在于 sites 中,所以不会执行插入操作。
        // 知识点3:存在key,hashmap中key对应的值,但是不会进行修改或者插入。
        System.out.println(sites.putIfAbsent(2, "Wiki"));// 输出:Jiyik
        System.out.println("Updated Languages: " + sites);// 输出:Updated Languages: {1=Google, 2=Jiyik, 3=Taobao, 4=Weibo}


        // 知识点4:hashMap中运行存在键为null的。
        sites.put(null, "baidu");
        System.out.println("Updated Languages: " + sites);// 输出:Updated Languages: {null=baidu, 1=Google, 2=Jiyik, 3=Taobao, 4=Weibo, 10=null}
        // 知识点5:值为null也行
        sites.put(10,null);
        System.out.println("Updated Languages: " + sites);
        // 知识点6:如果key存在,且值为null,那么输出也是null、所以,输出为null,不一定说明hashmap中一定不存在这个键。
        System.out.println(sites.putIfAbsent(10, "yimeng"));// 输出:null
        // 知识点7:如果key存在,且值为null,将会进行修改。
        System.out.println("Updated Languages: " + sites);// 输出:Updated Languages: {null=baidu, 1=Google, 2=Jiyik, 3=Taobao, 4=Weibo, 10=yimeng}
    }
}

getOrDefault()

getOrDefault() 方法获取指定 key 对应对 value,如果找不到 key ,则返回设置的默认值。

例子

package com.example.springbootdemo;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;

/**
 * @Author yimeng
 * @Date 2024/4/26 9:27
 * @PackageName:com.example.springbootdemo
 * @ClassName: HashMapMethodTest
 * @Description: TODO
 * @Version 1.0
 */
@SpringBootTest
public class HashMapMethodTest {
    @Test
    void test() {
        // 创建一个 HashMap
        HashMap<Integer, String> sites = new HashMap<>();

        // 往 HashMap 添加一些元素
        sites.put(1, "Google");
        sites.put(2, "Jiyik");
        sites.put(3, "Taobao");
        System.out.println("sites HashMap: " + sites);// 输出:sites HashMap: {1=Google, 2=Jiyik, 3=Taobao}

        // key 的映射存在于 HashMap 中
        // 没找到 - 如果 HashMap 中没有该 key,则返回默认值
        String value1 = sites.getOrDefault(1, "没找到");
        System.out.println("键为1的值是:" + value1);// 输出:键为1的值是:Google

        // key 的映射不存在于 HashMap 中
        // 没找到 - 如果 HashMap 中没有该 key,则返回默认值
        String value2 = sites.getOrDefault(4, "没找到");
        System.out.println("键为4的值是:" + value2);// 输出:键为4的值是:没找到
    }
}

entrySet()

获取键值对集合。返回值是一个Set<Map.Entry<K,V>>。

例子

package com.example.springbootdemo;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;

/**
 * @Author yimeng
 * @Date 2024/4/26 9:27
 * @PackageName:com.example.springbootdemo
 * @ClassName: HashMapMethodTest
 * @Description: TODO
 * @Version 1.0
 */
@SpringBootTest
public class HashMapMethodTest {
    @Test
    void test() {
        // 创建一个 HashMap
        HashMap<Integer, String> sites = new HashMap<>();

        // 往 HashMap 添加一些元素
        sites.put(1, "Google");
        sites.put(2, "Jiyik");
        sites.put(3, "Taobao");
        System.out.println("sites HashMap: " + sites);// 输出:sites HashMap: {1=Google, 2=Jiyik, 3=Taobao}

        // 返回映射关系中 set view
        System.out.println("Set View: " + sites.entrySet());// 输出:Set View: [1=Google, 2=Jiyik, 3=Taobao]
    }
}

keySet()

返回映射中所有 key 组成的 Set 视图。返回的是Set

例子:

package com.example.springbootdemo;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;

/**
 * @Author yimeng
 * @Date 2024/4/26 9:27
 * @PackageName:com.example.springbootdemo
 * @ClassName: HashMapMethodTest
 * @Description: TODO
 * @Version 1.0
 */
@SpringBootTest
public class HashMapMethodTest {
    @Test
    void test() {
        // 创建一个 HashMap
        HashMap<Integer, String> sites = new HashMap<>();

        // 往 HashMap 添加一些元素
        sites.put(1, "Google");
        sites.put(2, "Jiyik");
        sites.put(3, "Taobao");
        System.out.println("sites HashMap: " + sites);// 输出:sites HashMap: {1=Google, 2=Jiyik, 3=Taobao}

        // 返回所有 key 组成的 set 集合视图
        System.out.println("Keys: " + sites.keySet());// 输出:Keys: [1, 2, 3]
    }
}

values()

values() 方法返回映射中所有 value 组成的 Set 视图。返回的是Collection

例子

package com.example.springbootdemo;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;

/**
 * @Author yimeng
 * @Date 2024/4/26 9:27
 * @PackageName:com.example.springbootdemo
 * @ClassName: HashMapMethodTest
 * @Description: TODO
 * @Version 1.0
 */
@SpringBootTest
public class HashMapMethodTest {
    @Test
    void test() {
        // 创建一个 HashMap
        HashMap<Integer, String> sites = new HashMap<>();

        // 往 HashMap 添加一些元素
        sites.put(1, "Google");
        sites.put(2, "Jiyik");
        sites.put(3, "Taobao");
        System.out.println("sites HashMap: " + sites);// 输出:sites HashMap: {1=Google, 2=Jiyik, 3=Taobao}

        // 访问 HashMap 中所有的 value
        System.out.print("Values: ");// 输出:Values: 

        // values() 返回所有 value 的一个视图
        // for-each 循环可以 从view中访问每一个value值
        for(String value: sites.values()) {
            // 输出每一个value
            System.out.print(value + ", ");// 输出:Google, 
        }
    }
}

merge()

merge() 方法会先判断指定的 key 是否存在。如果key不存在,则把键和第二个参数的值添加到 hashMap 中,并且返回第二个参数的值。如果 key 存在,则更新那个键值对的值为第三个参数计算后的值,并且返回 第三个参数计算后的值

例子

package com.example.springbootdemo;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;

/**
 * @Author yimeng
 * @Date 2024/4/26 9:27
 * @PackageName:com.example.springbootdemo
 * @ClassName: HashMapMethodTest
 * @Description: TODO
 * @Version 1.0
 */
@SpringBootTest
public class HashMapMethodTest {
    @Test
    void test() {
        //创建一个HashMap
        HashMap<String, Integer> prices = new HashMap<>();

        // 往 HashMap 插入映射
        prices.put("Shoes", 200);
        prices.put("Bag", 300);
        prices.put("Pant", 150);
        System.out.println("HashMap: " + prices);// 输出:HashMap: {Pant=150, Bag=300, Shoes=200}

        // 知识点1:如果键不存在,则将键和值(第二个参数)对插入到 HashMap 中
        int returnedValue = prices.merge("Shirt", 100, (oldValue, newValue) -> oldValue + newValue);
        System.out.println("Price of Shirt: " + returnedValue);// 输出:Price of Shirt: 100

        // 输出插入后的 HashMap
        System.out.println("Insert HashMap: " + prices);// 输出:Insert HashMap: {Pant=150, Shirt=100, Bag=300, Shoes=200}


        // 知识点2:如果键存在,则会把对应的值更新值为第三个参数的执行结果,并把第三个参数的执行结果当作merge方法的返回值
        //合并 key为 Shoes的映射
        Integer returnedValue1 = prices.merge("Shoes", 123, (oldValue, newValue) -> oldValue + newValue);
        System.out.println("Shoes: " + returnedValue1);// 输出:Shoes: 323
        // 输出更新后的 HashMap
        System.out.println("Updated HashMap: " + prices);// 输出:Updated HashMap: {Pant=150, Shirt=100, Bag=300, Shoes=323}
    }
}

compute()

对 hashMap 中指定 key 的值进行重新计算。如果 key 对应的 value 不存在,则返回该 null,如果存在,则返回通过 remappingFunction 重新计算后的值。

例子

package com.example.springbootdemo;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;

/**
 * @Author yimeng
 * @Date 2024/4/26 9:27
 * @PackageName:com.example.springbootdemo
 * @ClassName: HashMapMethodTest
 * @Description: TODO
 * @Version 1.0
 */
@SpringBootTest
public class HashMapMethodTest {
    @Test
    void test() {
        //创建一个 HashMap
        HashMap<String, Integer> prices = new HashMap<>();

        // 往HashMap中添加映射项
        prices.put("Shoes", 200);
        prices.put("Bag", 300);
        prices.put("Pant", 150);
        System.out.println("HashMap: " + prices);// 输出:HashMap: {Pant=150, Bag=300, Shoes=200}

        // 重新计算鞋子打了10%折扣后的值
        // 知识点1:如果key存在,那么就重新计算HashMap中对应的value值(更新),并返回计算后的值作为compute的返回值
        int newPrice = prices.compute("Shoes", (key, value) -> value - value * 10/100);
        System.out.println("Discounted Price of Shoes: " + newPrice);// 输出:Discounted Price of Shoes: 180

        // 输出更新后的HashMap
        System.out.println("Updated HashMap: " + prices);// 输出:Updated HashMap: {Pant=150, Bag=300, Shoes=180}

        // 知识点2:如果key不存在。可能会报错,看你使用。比如,newPrice2,不会报错。但是newPrice4会报错。不报错的话就相当于是插入。报错的话,就停止了。
        int newPrice2 = prices.compute("apple", (key, value) -> 100);
        System.out.println("Discounted Price of Apple: " + newPrice2);// 输出:Discounted Price of Apple: 100

        // 输出更新后的HashMap
        System.out.println("Updated HashMap: " + prices);// 输出:Updated HashMap: {apple=100, Pant=150, Bag=300, Shoes=180}


        // 知识点3:上面插入了,所以这里就相当于是更新了。同知识点1.
        int newPrice3 = prices.compute("apple", (key, value) -> value - value * 10/100);
        System.out.println("Discounted Price of Apple: " + newPrice3);// 输出:Discounted Price of Apple: 90

        // 输出更新后的HashMap
        System.out.println("Updated HashMap: " + prices);// 输出:Updated HashMap: {apple=90, Pant=150, Bag=300, Shoes=180}

        // 知识点4:第二个参数中获取键和值都是可以的。
        int newPrice666 = prices.compute("apple", (key, value) -> {
            System.out.println(key+value);// 输出:apple90
            return 999;
        });
        System.out.println("Discounted Price of Apple: " + newPrice666);// 输出:Discounted Price of Apple: 999
        
        // 输出更新后的HashMap
        System.out.println("Updated HashMap: " + prices);// 输出:Updated HashMap: {apple=999, Pant=150, Bag=300, Shoes=180}

        // 知识点5:可能会报错,看你重新计算中的语句是否允许value为null也能执行成功。
        int newPrice4 = prices.compute("banana", (key, value) -> value - value * 10/100);
        System.out.println("Discounted Price of Banana: " + newPrice4);// 输出:java.lang.NullPointerException

        // 输出更新后的HashMap
        System.out.println("Updated HashMap: " + prices);// 输出:没执行到!!!!
    }
}

computeIfAbsent()

对 hashMap 中指定 key 的值进行重新计算,如果不存在这个 key,则添加到 hashMap 中。

例子

package com.example.springbootdemo;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;

/**
 * @Author yimeng
 * @Date 2024/4/26 9:27
 * @PackageName:com.example.springbootdemo
 * @ClassName: HashMapMethodTest
 * @Description: TODO
 * @Version 1.0
 */
@SpringBootTest
public class HashMapMethodTest {
    @Test
    void test() {
        // 创建一个 HashMap
        HashMap<String, Integer> prices = new HashMap<>();

        // 往HashMap中添加映射项
        prices.put("Shoes", 200);
        prices.put("Bag", 300);
        prices.put("Pant", 150);
        System.out.println("HashMap: " + prices);//输出:HashMap: {Pant=150, Bag=300, Shoes=200}

        // 知识点1:没有就插入计算后的值。并且computeIfAbsent方法返回计算后的值。
        // 计算 Shirt 的值
        int shirtPrice = prices.computeIfAbsent("Shirt", key -> 280);
        System.out.println("Price of Shirt: " + shirtPrice);//输出:Price of Shirt: 280

        // 输出更新后的HashMap
        System.out.println("Updated HashMap: " + prices);//输出:Updated HashMap: {Pant=150, Shirt=280, Bag=300, Shoes=200}

        // 知识点2:有不会执行重新计算。并且computeIfAbsent方法返回原来集合中的值。
        // Shoes中的映射关系已经存在
        // Shoes并没有计算新值
        int shoePrice = prices.computeIfAbsent("Shoes", (key) -> 666);
        System.out.println("Price of Shoes: " + shoePrice);//输出:Price of Shoes: 200

        // 输出更新后的 HashMap
        System.out.println("Updated HashMap: " + prices);//输出:Updated HashMap: {Pant=150, Shirt=280, Bag=300, Shoes=200}
    }
}

computeIfPresent()

对 hashMap 中指定 key 的值进行重新计算,前提是该 key 存在于 hashMap 中。

例子

package com.example.springbootdemo;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.HashMap;

/**
 * @Author yimeng
 * @Date 2024/4/26 9:27
 * @PackageName:com.example.springbootdemo
 * @ClassName: HashMapMethodTest
 * @Description: TODO
 * @Version 1.0
 */
@SpringBootTest
public class HashMapMethodTest {
    @Test
    void test() {
        // 创建一个 HashMap
        HashMap<String, Integer> prices = new HashMap<>();

        // 往HashMap中添加映射关系
        prices.put("Shoes", 200);
        prices.put("Bag", 300);
        prices.put("Pant", 150);
        System.out.println("HashMap: " + prices);// 输出:HashMap: {Pant=150, Bag=300, Shoes=200}

        // 知识点1:如果存在。就重新计算。
        // 重新计算鞋加上10%的增值税后的价值
        int shoesPrice = prices.computeIfPresent("Shoes", (key, value) -> value + value * 10/100);
        System.out.println("Price of Shoes after VAT: " + shoesPrice);// 输出:Price of Shoes after VAT: 220

        // 输出更新后的HashMap
        System.out.println("Updated HashMap: " + prices);// 输出:Updated HashMap: {Pant=150, Bag=300, Shoes=220}

        // 知识点2:如果不存在。会出现异常。没有用value也会出现异常。和上面的compute()不一样。
        int shirtPrice = prices.computeIfPresent("Shirt", (key, value) -> 66);
        System.out.println("Price of Shirt after VAT: " + shirtPrice);// 输出:java.lang.NullPointerException

        // 输出更新后的HashMap
        System.out.println("Updated HashMap: " + prices);// 输出:没有执行
    }
}

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

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

相关文章

2024年Q1季度平板电视行业线上市场销售数据分析

Q1季度平板电视线上市场表现不如预期。 根据鲸参谋数据显示&#xff0c;2024年1月至3月线上电商平台&#xff08;京东天猫淘宝&#xff09;平板电视累计销量约360万件&#xff0c;环比下降12%&#xff0c;同比下降30%&#xff1b;累计销售额约99亿元&#xff0c;环比下降28%&a…

Mockaroo - 在线生成测试用例利器

简介&#xff1a;Mockaroo 是一个无需安装的在线工具&#xff0c;用于生成大量的自定义测试数据。它支持多种数据格式&#xff0c;如JSON、CSV、SQL和Excel&#xff0c;并能模拟复杂的数据结构。 历史攻略&#xff1a; 测试用例&#xff1a;多条件下编写&#xff0c;懒人妙用…

《苍穹外卖》Day08部分知识点记录

一、useGeneratedKeys和keyProperty useGeneratedKeys和keyProperty是<insert>标签中的两个属性&#xff0c;用于处理自动生成的主键值。 1. useGeneratedKeys userGeneratedKeys"true"表示启用自动生成主键功能&#xff1b;当useGeneratedKeys设置为true时…

Yolov5 export.py实现onnx模型的导出

查了很多资料&#xff0c;很多用python代码写的&#xff0c;只需要这个库那个库的&#xff0c;最后都没成功。 不如直接使用Yolov5里面的 export.py实现模型的转换。 一&#xff1a;安装依赖 因为yolov5里面的requirments.txt是将这些转换模型的都注释掉了 所以需要解除注释…

Redis网络相关的结构体 和 reactor模式

目录 1. epoll的封装 结构体aeApiStae 创建epoll fd的封装 epoll_ctl的封装 epoll_wait的封装 2. 结构体aeFileEvent、aeFiredEvent、aeTimeEvent 结构体aeFileEvent 结构体aeFiredEvent 结构体aeTimeEvent 3. struct aeEventLoop aeEventLoop相关的函数 1. 创建eve…

pycharm编辑器------快捷键

pycharm编辑器基础快捷键 上下文操作 01PyCharm 有数百个上下文相关操作&#xff0c;可以帮助您转换、改进和修正代码。按 AIt Enter 以调用“显示上下文操作"。 02我们来应用第一个快速修复:移除形参。 03您几乎可以在任何上下文中调用"显示上下文操作"。我们…

前端补充---15

一、新增表单 <!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><meta name"viewport" content"widthdevice-width, initial-scale1.0"><title>Document</title> </head&g…

C++11 数据结构7 队列的链式存储,实现,测试

前期考虑 队列是两边都有开口&#xff0c;那么在链式情况下&#xff0c;线性表的链式那一边作为对头好呢&#xff1f; 从线性表的核心的插入和删除算法来看&#xff0c;如果在线性表链表的头部插入&#xff0c;每次循环都不会走&#xff0c;但是删除的时候&#xff0c;要删除线…

IDEA中配置使用maven和配置maven的中央仓库

1 以汉化后的IDEA为例配置maven 打开idea选择文件 选择 设置 点击>构建.执行.部署 点击>构建工具 点击>Maven 其中Maven主路径 就是我们maven下载解压后的路径 可以通过边上的三个点选择你解压后的绝对路径&#xff0c;也可以直接把解压后的绝对路劲复制过来 以下…

C++之通俗易懂学模版

目录 一、了解什么是泛性编程 二、模版 1.函数模版 1.1 函数模板概念 1.2 函数模板格式 1.3 函数模板的原理 1.4 函数模板的实例化 1.5 模板参数的匹配原则 2.类模板 2.1 类模板的定义格式 2.2 类模板的实例化 3. 非类型模板参数 4. 模板的特化 4.1 概念 4.2 …

半导体晶圆厂内外网数据单向导出,什么样的方案才安全又便捷?

半导体晶圆厂企业为了隔绝外部⽹络有害攻击、保护⽹络和数据安全&#xff0c;通常采⽤物理隔离的⽅式&#xff0c;将企业内⽹与互联⽹隔离。⽹络隔离后&#xff0c;基于业务开展需求&#xff0c;部分重要数据仍需由内⽹导⼊及导出⾄外部⽹络区域。为保障数据的安全合规性&#…

【Qt常用控件】—— 多元素控件

目录 1.1 List Widget 1.2 Table Widget 1.3 Tree Widget 1.4 小结 Qt 中提供的多元素控件有: QListWidget QListView QTableWidget QTableView QTreeWidget QTreeView xxWidget 和 xxView 之间的区别 以 QTableWidget 和 QTableView 为例&#xff1a; QTableView 是基于…

Java:优先级队列(堆)

一、初识【堆】 1、什么是【优先级队列】&#xff1f; 前面的文章我们介绍过队列&#xff0c;队列是一种先进先出的数据结构&#xff0c;但是&#xff0c;在某些情况下&#xff0c;操作的数据可能需要有一个优先级来获取数据&#xff0c;例如优先获取队列中最大的元素&#xf…

这个合租室友真的没有一点公德心,还好他搬走了

这个合租室友真的没有一点公德心&#xff0c;还好他搬走了 这个出租屋有四个房间。 有三个卧室&#xff0c;和一个隔断。 我住三个卧室中的一个。下图中右边那个就是我住的。 2023年下半年&#xff0c;左边那个屋子来了一个新租户小白。 在住的过程中&#xff0c;隔断间的租…

致力于为企业提升媒体宣传的一种新策略-软文发稿和投放

随着新媒体时代的快速发展&#xff0c;媒体宣发的方式也在不断迭代&#xff0c;其中&#xff0c;“软文发稿”成为了许多企业非常看重的一种媒体宣发方式。那么&#xff0c;什么是“软文发稿”呢&#xff1f;这是一种通过撰写有新闻属性的广告文章&#xff0c;将企业的品牌、产…

武汉星起航:凭借专业优势,助力卖家孵化,推动跨境电商发展

在全球经济一体化的大背景下&#xff0c;跨境电商行业以其独特的优势&#xff0c;成为了推动国际贸易发展的重要力量。作为这一领域的佼佼者&#xff0c;武汉星起航电子商务有限公司积极践行“走出去”战略&#xff0c;凭借自营店铺运营经验和跨境电商资源的积累&#xff0c;利…

嵌入式学习59-ARM7(自动设备号和混杂设备)

知识零碎&#xff1a; 头文件查找&#xff1a; /arm/路径下的头文件 linux驱动程序的编写&#xff0c;编译&#xff0c;运行过程 -------------------------------------------------------------------------------------------------------------------------------- 1.…

photoshop如何使用PS中的吸管工具吸取软件外部的颜色?

第一步&#xff0c;打开PS&#xff0c;随意新建一个画布&#xff0c;或打开一个图片。 第二步&#xff0c;将PS窗口缩小&#xff0c;和外部窗口叠加放置&#xff0c;以露出后面的其它页面。 第三步&#xff0c;选中吸管工具&#xff0c;在PS窗口内单击一点吸取颜色&#xff0c;…

个人信息 | Q1违规通报分析出炉,通报量环比提升180%,工信部重点方向明晰!

为协助企业了解监管部门动向&#xff0c;爱加密基于移动应用安全大数据平台长期收集个人信息违规通报信息&#xff0c;并定期抽查新上架及有更新应用的个人信息合规情况&#xff0c;未来将定期公布部分分析结果&#xff0c;以便各企业了解监管侧及市场侧情况。 根据爱加密统计…

一文带你看懂多线程编程

title: 深入理解多线程编程 date: 2024/4/25 17:32:02 updated: 2024/4/25 17:32:02 categories: 后端开发 tags: 线程同步互斥锁死锁避免竞态条件线程池异步编程性能优化 第一章&#xff1a;多线程基础 1.1 线程概念与原理 线程&#xff1a;在操作系统中&#xff0c;一个…