当前位置: 首页 > news >正文

江苏国智建设有限公司网站/百度平台电话多少

江苏国智建设有限公司网站,百度平台电话多少,做2手车网站需要多少钱,wordpress unknown目录 一、文本显示1.1 设置文本内容1.2 设置文本大小1.3 设置文本颜色 二、视图基础2.1 设置视图宽高2.2 设置视图间距2.3 设置视图对齐方式 三、常用布局3.1 线性布局LinearLayout3.2 相对布局RelativeLayout3.3 网格布局GridLayout3.4 滚动视图ScrollView 四、按钮触控4.1 按…

目录

  • 一、文本显示
    • 1.1 设置文本内容
    • 1.2 设置文本大小
    • 1.3 设置文本颜色
  • 二、视图基础
    • 2.1 设置视图宽高
    • 2.2 设置视图间距
    • 2.3 设置视图对齐方式
  • 三、常用布局
    • 3.1 线性布局LinearLayout
    • 3.2 相对布局RelativeLayout
    • 3.3 网格布局GridLayout
    • 3.4 滚动视图ScrollView
  • 四、按钮触控
    • 4.1 按钮控件
    • 4.2 点击和长按事件
    • 4.3 禁用与恢复按钮
  • 五、图像显示
    • 5.1 图像视图ImageView
    • 5.2 图像按钮ImageButton
    • 5.3 同时展示文本与图像

一、文本显示

1.1 设置文本内容

android:text 属性

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"><TextViewandroid:id="@+id/tv_hello"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="@string/hello"/>
</LinearLayout>

1.2 设置文本大小

字体大小用sp单位

android:textSize 属性

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><TextViewandroid:id="@+id/tv_dp"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="@string/hello"android:textSize="30sp"/>
</LinearLayout>

1.3 设置文本颜色

android:textColor 属性

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><TextViewandroid:id="@+id/tv_code_system"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="代码设置系统自动的颜色代码"android:textSize="17sp"/><TextViewandroid:id="@+id/tv_code_eight"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="代码设置8位颜色"android:textSize="17sp"/><TextViewandroid:id="@+id/tv_code_six"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="代码设置6位颜色"android:textSize="17sp"/><TextViewandroid:id="@+id/tv_xml"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="xml设置6位颜色"android:textSize="17sp"android:textColor="#ff00ff"/><TextViewandroid:id="@+id/tv_values"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="xml设置6位颜色"android:textSize="17sp"android:textColor="@color/teal_200"/><TextViewandroid:id="@+id/tv_code_background"android:layout_width="wrap_content"android:layout_height="wrap_content"android:text="背景设置绿色"android:textSize="17sp"/><!--  android:background="@color/teal_200" -->
</LinearLayout>

二、视图基础

2.1 设置视图宽高

视图宽高和间距用dp单位

android:layout_width 设置宽度
android:layout_height 设置高度
wrap_content 由内容撑开,match_parent 匹配父容器

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:textColor="@color/teal_200"android:layout_marginTop="5dp"android:background="@color/black"android:textSize="17sp"/></LinearLayout>

2.2 设置视图间距

间距用dp单位
这里和前端的css属性非常类似,比如左边距margin-lfet,在安卓中就是layout_marginLeft

android:padding 设置内边距
android:layout_margin 设置外边距

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="300dp"android:orientation="vertical"android:background="#00aaff"android:padding="30dp"><!--中间层布局颜色为黄色--><LinearLayoutandroid:layout_width="match_parent"android:layout_height="match_parent"android:layout_margin="20dp"android:background="#ffff99"android:padding="60dp"><!--内层视图颜色为红色--><Viewandroid:layout_width="match_parent"android:layout_height="match_parent"android:background="#00ff00" /></LinearLayout></LinearLayout>

2.3 设置视图对齐方式

android:layout_gravity 设置父容器的对齐方式
android:gravity 设置子组件在父容器的对齐方式

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_height="300dp"android:layout_width="match_parent"android:background="#ffff99"android:orientation="horizontal"><!-- 第一个子布局背景为红色,它在上级视图中朝下对齐,它的下级视图则靠左对齐 --><LinearLayoutandroid:layout_width="0dp"android:layout_height="200dp"android:layout_weight="1"android:layout_margin="10dp"android:padding="10dp"android:background="#ff0000"android:layout_gravity="bottom"android:gravity="center"><!--内部视图的宽度和高度都是100dp,且背景色为青色--><Viewandroid:layout_width="100dp"android:layout_height="100dp"android:background="@color/teal_200"/></LinearLayout><!--第二个子布局背景为红色,它在上级视图中朝上对齐,它的下级视图则靠右对齐--><LinearLayoutandroid:layout_width="0dp"android:layout_height="200dp"android:layout_weight="1"android:layout_margin="10dp"android:padding="10dp"android:background="#ff0000"android:gravity="right"><!--内部视图的宽度和高度都是100dp,且背景色为青色--><Viewandroid:layout_width="100dp"android:layout_height="100dp"android:background="@color/teal_200"/></LinearLayout></LinearLayout>

在这里插入图片描述

三、常用布局

3.1 线性布局LinearLayout

LinearLayout 为线性布局,它可以通过android:orientation 来设置页面的排列方向,vertical是垂直方向,horizontal是水平方向排列
代码示例:

<!--水平排列--><LinearLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:orientation="horizontal"><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="横排第一个"android:textSize="17sp"android:textColor="#000000"/><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="横排第二个"android:layout_marginLeft="10dp"android:textSize="17sp"android:textColor="#000000"/></LinearLayout>

3.2 相对布局RelativeLayout

相对布局可以相对某一个组件设置对齐方式,比如要让A组件在B组件的下面,就可以使用android:layout_below="@id/B"
常用属性如下:

  • android:layout_centerInParent="true" 在父容器中间对齐
  • android:layout_centerHorizontal="true" 在父容器水平居中
  • android:layout_centerVertical="true" 在父容器垂直居中
  • android:layout_alignParentLeft="true" 在父容器左边对齐
  • android:layout_alignParentRight="true" 在父容器右边对齐
  • android:layout_alignParentTop="true" 在父容器顶部对齐
  • android:layout_alignParentBottom="true" 在父容器底部对齐
  • android:layout_toLeftOf="@id/tv_center" 在tv_center组件的左边
  • android:layout_toRightOf="@id/tv_center" 在tv_center组件的右边
  • android:layout_above="@id/tv_center" 在tv_center组件的上边
  • android:layout_below="@id/tv_center" 在tv_center组件的下方
  • android:layout_alignTop="@id/tv_center" 与tv_center组件顶部对齐
  • android:layout_alignBottom="@id/tv_center" 与tv_center组件底部对齐
  • android:layout_alignLeft="@id/tv_center" 与tv_center组件左边对齐
  • android:layout_alignRight="@id/tv_center" 与tv_center组件右边对齐

3.3 网格布局GridLayout

网格布局就是类似表格一样的布局,用起来还是很方便的
常用属性:

属性作用
android:columnCount设置列数
android:rowCount设置行数
android:layout_columnWeight设置列宽的权重
android:layout_rowWeight纵向乘剩余空间分配方式
android:layout_rowSpan横向跨几行
android:layout_columnSpan横向跨几列

代码示例:

<?xml version="1.0" encoding="utf-8"?>
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:columnCount="2"android:rowCount="2"><TextViewandroid:layout_height="60dp"android:layout_width="0dp"android:layout_columnWeight="1"android:text="浅红色"android:background="#ffcccc"android:textColor="#000000"android:textSize="17sp"android:gravity="center"/><TextViewandroid:layout_height="60dp"android:layout_width="0dp"android:layout_columnWeight="1"android:text="橙色"android:background="#ffaa00"android:textColor="#000000"android:textSize="17sp"android:gravity="center"/><TextViewandroid:layout_height="60dp"android:layout_width="0dp"android:layout_columnWeight="1"android:text="绿色"android:background="#00ff00"android:textColor="#000000"android:textSize="17sp"android:gravity="center"/><TextViewandroid:layout_height="60dp"android:layout_width="0dp"android:layout_columnWeight="1"android:text="紫色"android:background="#660066"android:textColor="#000000"android:textSize="17sp"android:gravity="center"/>
</GridLayout>

在这里插入图片描述

3.4 滚动视图ScrollView

滚动视图分为垂直滚动和水平滚动
1.水平滚动HorizontalScrollView

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><!--水平滚动--><HorizontalScrollViewandroid:layout_width="wrap_content"android:layout_height="200dp"><!-- 水平方向的线性布局,两个于视图的颜色分别为青色和黄色--><LinearLayoutandroid:layout_width="wrap_content"android:layout_height="match_parent"android:orientation="horizontal"><Viewandroid:layout_width="300dp"android:layout_height="match_parent"android:background="#aaffff" /><Viewandroid:layout_width="300dp"android:layout_height="match_parent"android:background="#aaff00"/></LinearLayout></HorizontalScrollView></LinearLayout>

在这里插入图片描述
2. 垂直滚动ScrollView

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><!--垂直滚动--><ScrollViewandroid:layout_width="match_parent"android:layout_height="wrap_content"><LinearLayoutandroid:layout_width="wrap_content"android:layout_height="match_parent"android:orientation="vertical"><Viewandroid:layout_width="match_parent"android:layout_height="400dp"android:background="#00ff00" /><Viewandroid:layout_width="match_parent"android:layout_height="400dp"android:background="#ffffaa"/></LinearLayout></ScrollView>
</LinearLayout>

在这里插入图片描述

四、按钮触控

可以通过findViewById找到在xml中定义的组件,只要在xml中定义组件时指定id即可

4.1 按钮控件

按钮控件用Button标签,按钮控件自带样式,如果想要自定义样式要先修改res->values->themes.xml中的parent属性值为"Theme.MaterialComponents.DayNight.DarkActionBar.Bridge"
代码示例:

    <Buttonandroid:layout_width="match_parent"android:layout_height="wrap_content"android:text="Hello world"android:textColor="@color/black"android:textSize="17sp"/>

4.2 点击和长按事件

1.点击事件
定义两个按钮,演示不同的绑定事件的方法

    <Buttonandroid:id="@+id/btn_click_single"android:layout_width="match_parent"android:layout_height="wrap_content"android:text="指定点击事件监听"android:textColor="#000000"android:textSize="17sp"/><Buttonandroid:id="@+id/btn_click_public"android:layout_width="match_parent"android:layout_height="wrap_content"android:text="指定公点击事件监听"android:textColor="#000000"android:textSize="17sp"/>

在ButtonClickActivity中绑定监听事件。绑定监听事件有两种方式,第一种让本类实现View.OnClickListener接口,重写onClick方法,第二种是自定义一个类实现View.OnClickListener接口,重写onClick方法

public class ButtonClickActivity extends AppCompatActivity implements View.OnClickListener{private TextView tv_result;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_button_click);tv_result = findViewById(R.id.tv_result);Button btn_click_single = findViewById(R.id.btn_click_single);Button btn_click_public = findViewById(R.id.btn_click_public);btn_click_single.setOnClickListener(new MyOnClickListener(tv_result));btn_click_public.setOnClickListener(this);}//第二种方式@Overridepublic void onClick(View v) {if (v.getId() == R.id.btn_click_public){String s = String.format("%s 你点击了按钮: %s", DateUtil.getNowTime(), ((Button) v).getText());tv_result.setText(s);}}//第一种方式static class MyOnClickListener implements View.OnClickListener{private final TextView tv_result;public MyOnClickListener(TextView tv_result) {this.tv_result = tv_result;}@Overridepublic void onClick(View v) {String s = String.format("%s 你点击了按钮: %s", DateUtil.getNowTime(), ((Button) v).getText());tv_result.setText(s);}}
}

4.3 禁用与恢复按钮

按钮的禁用和启动主要通过enabled属性来控制,false禁用,true启用
可以通过xml配置,也可通过java代码设置。

1.xml设置

	<Buttonandroid:id="@+id/btn_test"android:layout_width="match_parent"android:layout_height="wrap_content"android:text="测试按钮"android:enabled="false"android:textColor="#888888"android:textSize="17sp"/>

2.java代码设置

public class ButtonEnableActivity extends AppCompatActivity implements View.OnClickListener{private Button btn_test;@Overrideprotected void onCreate(Bundle savedInstanceState) {super.onCreate(savedInstanceState);setContentView(R.layout.activity_button_enable);btn_test = findViewById(R.id.btn_test);//启用true|禁用falsebtn_test.setEnabled(true);}
}

五、图像显示

标签ImageView
1.android:adjustViewBounds:设置ImageView是否调整自己的边界来保持所显示图片的长宽比。
2.android:maxHeight:设置ImageView的最大高度。
3.android:maxWidth:设置ImageView的最大宽度。
5.android:src:设置ImageView所显示的Drawable对象的ID。
6.android:scaleType 图像在ImageView中的显示效果,下面是一些常用属性

  • fitXY :横向、纵向独立缩放,以适应该ImageView。
  • fitStart:保持纵横比缩放图片,并且将图片放在ImageView的左上角。
  • fitCenter:保持纵横比缩放图片,缩放完成后将图片放在ImageView的中央。
  • fitEnd:保持纵横比缩放图片,缩放完成后将图片放在ImageView的右下角。
  • center:把图片放在ImageView的中央,但是不进行任何缩放。
  • centerCrop:保持纵横比缩放图片,以使图片能完全覆盖ImageView。
  • centerInside:保持纵横比缩放图片,以使得ImageView能完全显示该图片。

图片资源放在下图中,注意不能用数字命名开头
在这里插入图片描述

5.1 图像视图ImageView

代码示例:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><ImageViewandroid:id="@+id/iv_scale"android:layout_width="match_parent"android:layout_height="220dp"android:layout_marginTop="5dp"android:scaleType="centerInside"android:src="@drawable/test"/><!--android:src="@drawable/ic_launcher_background"-->
</LinearLayout>

在这里插入图片描述

5.2 图像按钮ImageButton

标签是ImageButton,它继承于Button类
代码示例:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><ImageButtonandroid:layout_width="match_parent"android:layout_height="80dp"android:scaleType="centerCrop"android:src="@drawable/test" />
</LinearLayout>

在这里插入图片描述

5.3 同时展示文本与图像

常用属性值:

  • android:drawableBottom 底部添加图片
  • android:drawableEnd 在末尾添加图片
  • android:drawableLeft 在左边添加图片
  • android:drawableRight 在右边添加图片
  • android:drawabLeStart 在开始位置添加图片
  • android:drawableTop 在顶部添加图片

给Button添加图片和文字
代码示例:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><Buttonandroid:layout_width="wrap_content"android:layout_height="wrap_content"android:text="图标在左"android:drawableLeft="@drawable/btn"android:background="#ffffff"android:drawablePadding="5dp"/>
</LinearLayout>

在这里插入图片描述

相关文章:

Andriod 简单控件

目录 一、文本显示1.1 设置文本内容1.2 设置文本大小1.3 设置文本颜色 二、视图基础2.1 设置视图宽高2.2 设置视图间距2.3 设置视图对齐方式 三、常用布局3.1 线性布局LinearLayout3.2 相对布局RelativeLayout3.3 网格布局GridLayout3.4 滚动视图ScrollView 四、按钮触控4.1 按…...

Substructure‑aware subgraph reasoning for inductive relation prediction

摘要 关系预测的目的是推断知识图中实体之间缺失的关系,其中归纳关系预测因其适用于新兴实体的有效性而广受欢迎。大多数现有方法学习逻辑组合规则或利用子图来预测缺失关系。尽管在性能方面已经取得了很大的进展,但目前的模型仍然不是最优的,因为它们捕获拓扑信息的能力有…...

古诗词学习鉴赏APP设计与实现(源码+lw+部署文档+讲解等)

文章目录 前言具体实现截图论文参考详细视频演示为什么选择我自己的网站自己的小程序&#xff08;小蔡coding&#xff09;有保障的售后福利 代码参考源码获取 前言 &#x1f497;博主介绍&#xff1a;✌全网粉丝10W,CSDN特邀作者、博客专家、CSDN新星计划导师、全栈领域优质创作…...

深度学习与python theano

文章目录 前言1.人工神经网络2.计算机神经网络3.反向传播4.梯度下降-cost 函数1.一维2.二维3.局部最优4.迁移学习 5. theano-GPU-CPU theano介绍1.安装2.基本用法1.回归2.分类 3.function用法4.shared 变量5.activation function6.Layer层7.regression 回归例子8.classificatio…...

【算法优选】双指针专题——贰

文章目录 &#x1f60e;前言&#x1f332;[快乐数](https://leetcode.cn/problems/happy-number/)&#x1f6a9;题目描述&#x1f6a9;题⽬分析&#xff1a;&#x1f6a9;算法思路&#xff1a;&#x1f6a9;代码实现&#xff1a; &#x1f38b;[盛水最多的容器](https://leetco…...

AI智能电话机器人实用吗

近几年&#xff0c;人工智能得到很大的发展&#xff0c;同时语音识别技术的不断完善&#xff0c;很多以语音识别为基础的应用涌现出来&#xff0c;尤其是最近3年&#xff0c;出现了很多智能电话机器人。百度开发者大会上展示了百度智能客服也吸引了很多人对智能电话机器人的兴趣…...

网络爬虫--伪装浏览器

从用户请求的Headers反反爬 在访问某些网站的时候&#xff0c;网站通常会用判断访问是否带有头文件来鉴别该访问是否为爬虫&#xff0c;用来作为反爬取的一种策略。很多网站都会对Headers的User-Agent进行检测&#xff0c;还有一部分网站会对Referer进行检测&#xff08;一些资…...

C/C++程序的内存开辟

前面我们说过&#xff0c;计算机中内存分为三个区域&#xff1a;栈区&#xff0c;堆区&#xff0c;静态区 但是这只是个简化的版本&#xff0c;接下来我们仔细看看内存区域的划分 C/C程序内存分配的几个区域&#xff1a; 栈区&#xff08;stack&#xff09;&#xff1a;在执行…...

【Java 进阶篇】JDBC DriverManager 详解

JDBC&#xff08;Java Database Connectivity&#xff09;是 Java 标准库中用于与数据库进行交互的 API。它允许 Java 应用程序连接到各种不同的数据库管理系统&#xff08;DBMS&#xff09;&#xff0c;执行 SQL 查询和更新操作&#xff0c;以及处理数据库事务。在 JDBC 中&am…...

2023年Linux总结常用命令

1.常用命令 1.1创建文件夹 mkdir -p forever/my 1.2当前目录 pwd 1.3创建文件 touch 1.txt 1.4查看文件 cat 1.txt 1.5复制文件 说明&#xff1a;-r是复制文件夹 cp -r my myCopy 1.6删除文件 说明&#xff1a;-r带包删除文件夹&#xff0c;-f表示强制删除(保存问题) rm -r…...

Mybatis3详解 之 全局配置文件详解

1、全局配置文件 前面我们看到的Mybatis全局文件并没有全部列举出来&#xff0c;所以这一章我们来详细的介绍一遍&#xff0c;Mybatis的全局配置文件并不是很复杂&#xff0c;它的所有元素和代码如下所示&#xff1a; <?xml version"1.0" encoding"UTF-8&…...

力扣-345.反转字符串中的元音字母

Idea 将s中的元音字母存在字符串sv中&#xff0c;并且使用一个数组依次存储元音字母的下标。 然后将字符串sv进行反转&#xff0c;并遍历元音下标数组&#xff0c;将反转后的字符串sv依次插入到源字符串s中 AC Code class Solution { public:string reverseVowels(string s) {…...

643. 子数组最大平均数I(滑动窗口)

目录 一、题目 二、代码 一、题目 643. 子数组最大平均数 I - 力扣&#xff08;LeetCode&#xff09; 二、代码 class Solution { public:double findMaxAverage(vector<int>& nums, int k) {double Average INT_MIN;double sum nums[0];int left 0, right 0…...

Java 21 新特性:虚拟线程(Virtual Threads)

I often take exercise. Why only yesterday I had breakfast in bed. 在Java 21中&#xff0c;引入了虚拟线程&#xff08;Virtual Threads&#xff09;来简化和增强并发性&#xff0c;这使得在Java中编程并发程序更容易、更高效。 虚拟线程&#xff0c;也称为“用户模式线程…...

18scala笔记

Scala2.12 视频地址 1 入门 1.1 发展历史 … 1.2 Scala 和 Java Scala Java 编写代码使用scalac编译成.class字节码文件scala .class文件 执行代码 1.3 特点 1.4 安装 视频地址 注意配置好环境变量 简单代码 1.5 编译文件 编译scala文件会产生两个.class文件 使用java…...

【LeetCode周赛】LeetCode第365场周赛

目录 有序三元组中的最大值 I有序三元组中的最大值 II无限数组的最短子数组 有序三元组中的最大值 I 给你一个下标从 0 开始的整数数组nums。 请你从所有满足 i < j < k 的下标三元组 (i, j, k) 中&#xff0c;找出并返回下标三元组的最大值。如果所有满足条件的三元组的…...

响应式设计的实现方式

一. 什么是响应式 响应式网站设计是一种网络页面设计布局。页面的设计与开发应当根据用户行为以及设备环境&#xff08;系统平台&#xff0c;屏幕尺寸&#xff0c;屏幕定向等&#xff09;进行相应的响应和调整。 响应式网站常见特点&#xff1a; 1. 同时适配PC平板手机。 2…...

PHP 反序列化漏洞:__PHP_Incomplete_Class 与 serialize(unserialize($x)) !== $x;

文章目录 参考环境声明__PHP_Incomplete_Class灵显为什么需要 __PHP_Incomplete_Class&#xff1f;不可访问的属性 serialize(unserialize($x)) $x;serialize(unserialize($x)) ! $x;雾现__PHP_Incomplete_Class 对象与其序列化文本的差异试构造 __PHP__Incomplete_Class 对象…...

TempleteMethod

TempleteMethod 动机 在软件构建过程中&#xff0c;对于某一项任务&#xff0c;它常常有稳定的整体操作结构&#xff0c;但各个子步骤却有很多改变的需求&#xff0c;或者由于固有的原因 &#xff08;比如框架与应用之间的关系&#xff09;而无法和任务的整体结构同时实现。如…...

1558. 得到目标数组的最少函数调用次数

1558. 得到目标数组的最少函数调用次数 原题链接&#xff1a;完成情况&#xff1a;解题思路&#xff1a;参考代码&#xff1a; 原题链接&#xff1a; 1558. 得到目标数组的最少函数调用次数 https://leetcode.cn/problems/minimum-numbers-of-function-calls-to-make-target…...

子域名扫描, 后台扫描

子域名和后台扫描 一, 子域名扫描 在渗透测试的早期阶段&#xff0c;子域名扫描是一个非常重要的步骤&#xff0c;它有助于识别目标组织的网络结构和在线资源。 子域名扫描应该在获得适当的权限和授权的情况下进行&#xff0c;以确保所有活动都是合法和合规的。 1. 原因与目…...

毛玻璃带有光影效果的卡片

效果展示 页面结构组成 从效果展示可以看到&#xff0c;页面的主要元素是卡片&#xff0c;卡片的内容呈现上都是比较常规的布局&#xff0c;只是卡片上带有光影效果。 CSS / JavaScript 知识点 transformVanillaTilt.js 使用 页面基础结构实现 <div class"contain…...

【Java】面向过程和面向对象思想||对象和类

1.面向过程和面向对象思想 两者都贯穿于软件分析、设计和开发的各个阶段&#xff0c;对应面向对象就分别称为面向对象的分析&#xff08;OOA&#xff09;、面向对象的设计&#xff08;OOD&#xff09;和面向对象的编程&#xff08;OOP&#xff09;。C语言是一种典型的面向过程语…...

孤举者难起,众行者易趋,openGauss 5.1.0版本正式发布!

&#x1f4e2;&#x1f4e2;&#x1f4e2;&#x1f4e3;&#x1f4e3;&#x1f4e3; 哈喽&#xff01;大家好&#xff0c;我是【IT邦德】&#xff0c;江湖人称jeames007&#xff0c;10余年DBA及大数据工作经验 一位上进心十足的【大数据领域博主】&#xff01;&#x1f61c;&am…...

软考——软件设计师中级2023年11月备考(1.计算机组成原理)

一、计算机组成原理 1.数据的表示 1.1 十进制转R进制 方法&#xff1a;对十进制数除R取余&#xff0c;最后对余数取倒序 如&#xff1a; 1.2 原码反码补码 1.3 浮点数 1.4 校验码 —— 海明码 &#xff08;非重点&#xff0c;了解即可&#xff09; 海明码的构成方法&…...

前端JavaScript入门到精通,javascript核心进阶ES6语法、API、js高级等基础知识和实战 —— Web APIs(四)

思维导图 一、日期对象 1.1 实例化 实例化&#xff0c;默认得到当前时间&#xff0c;也可以指定时间 1.2 日期对象方法 <!DOCTYPE html> <html lang"en"><head><meta charset"UTF-8"><meta http-equiv"X-UA-Compatible&q…...

【前端】HTML5 Audio 预加载 按照队列顺序播放音频, 可以陆续往队列中加内容

【前端】Audio 按照队列顺序播放音频, 可以陆续往队列中加内容 var 音频库 {} var 当前音频集合 [] /*** 将文本添加到队列中* 持续去播放* 播放过的音频会自动从队列中删除* * 已规划* 要保障同时进行加载的数据不能超过5个(线程池 5)* * param 文本*/播放音频队列(文本){i…...

【单片机】13-实时时钟DS1302

1.RTC的简介 1.什么是实时时钟&#xff08;RTC&#xff09; &#xff08;rtc for real time clock) &#xff08;1&#xff09;时间点和时间段的概念区分 &#xff08;2&#xff09;单片机为什么需要时间点【一定的时间点干什么事情】 &#xff08;3&#xff09;RTC如何存在于…...

springboot和vue:十三、VueX简介与安装与推荐视频+前端数据模拟MockJS

VueX简介与安装与推荐视频 VueX用于管理分散在vue各个组件中的数据。每一个VueX的核心都是一个store&#xff0c;当store中的状态发生变化时&#xff0c;与之绑定的视图也将重新渲染。store中的状态不允许被直接修改&#xff0c;只能显示提交mutationVueX中有五个重要的概念&a…...

[React] Zustand状态管理库

文章目录 1.Zustand介绍2.创建一个store3.使用方法3.1 获取状态3.2 更新状态3.3 访问存储状态3.4 处理异步数据3.5 在状态中访问和存储数组3.6 持续状态 4.总结 1.Zustand介绍 状态管理一直是现代程序应用中的重要组成部分, Zustand使用 hooks 来管理状态无需样板代码。 更少…...