java版本转换小工具

工作之余写了一个转换小工具,具有以下功能:

  • 时间戳转换
  • Base64编码/解码
  • URL编码/解码
  • JSON格式化

时间戳转换

package org.binbin.container.panel;

import javax.swing.*;
import java.awt.*;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 
 * Copyright © 启明星辰 版权所有
 *
 * @author 胡海斌/hu_haibin@venusgroup.com.cn
 * 2023/9/28 14:20
 */
public class TimePanel extends JPanel {
    private static final String template = "当前时间:TIME    当前时间戳:STAMP";
    private static final DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    private ExecutorService pool = Executors.newSingleThreadExecutor();
    private boolean stop;
    private JTextField currentTimeField;
    private JButton stopButton;

    private JTextField[] textFields;
    private JButton convertBuffon1;
    private JButton convertBuffon2;
    private JComboBox<String> comboBox1;
    private JComboBox<String> comboBox2;

    public TimePanel() {
        currentTimeField = new JTextField(template);
        currentTimeField.setToolTipText("请暂停时间后再复制");
        currentTimeField.setEditable(false);
        currentTimeField.setBorder(BorderFactory.createEmptyBorder());

        stopButton = new JButton("暂停");
        stopButton.addActionListener(e -> {
            stop = !stop;
            stopButton.setText(stop ? "继续" : "暂停");
            if(!stop) {
                pool.submit(new TimeDriver());
            }
        });
        pool.submit(new TimeDriver());

        JPanel panel1 = new JPanel();
        panel1.setLayout(new FlowLayout());
        panel1.add(currentTimeField);
        panel1.add(stopButton);
        setLayout(new FlowLayout());
        add(panel1);

        textFields = new JTextField[4];
        for (int i = 0; i < textFields.length; i++) {
            textFields[i] = new JTextField(12);
        }
        convertBuffon1 = new JButton("转换 >");
        convertBuffon2 = new JButton("转换 >");
        convertBuffon1.addActionListener(e -> {
            try {
                long time = Long.parseLong(textFields[0].getText());
                int index = comboBox1.getSelectedIndex();
                if(index == 1) {
                    time *= 1000;
                }
                Date date = new Date();
                date.setTime(time);
                textFields[1].setText(df.format(date));
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        });
        convertBuffon2.addActionListener(e -> {
            try {
                Date date = df.parse(textFields[2].getText());
                int index = comboBox2.getSelectedIndex();
                long time = date.getTime();
                if(index == 1) {
                    time /= 1000;
                }
                textFields[3].setText(time + "");
            } catch (Exception ex) {
                ex.printStackTrace();
            }
        });
        comboBox1 = new JComboBox<>();
        comboBox2 = new JComboBox<>();
        comboBox1.addItem("毫秒(ms)");
        comboBox1.addItem("秒(s)");
        comboBox2.addItem("毫秒(ms)");
        comboBox2.addItem("秒(s)");

        JPanel panel2 = new JPanel();
        panel2.add(textFields[0]);
        panel2.add(comboBox1);
        panel2.add(convertBuffon1);
        panel2.add(textFields[1]);

        JPanel panel3 = new JPanel();
        panel3.add(textFields[2]);
        panel3.add(convertBuffon2);
        panel3.add(textFields[3]);
        panel3.add(comboBox2);

        init();

        add(panel2);
        add(panel3);
    }

    public void init() {
        Date date = new Date();
        textFields[0].setText(date.getTime() + "");
        textFields[2].setText(df.format(date));
    }

    class TimeDriver implements Runnable {
        private final DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        @Override
        public void run() {
            while (!stop) {
                try {
                    Date now = new Date();
                    String text = template.replace("TIME", df.format(now)).replace("STAMP", now.getTime() + "");
                    currentTimeField.setText(text);
                    Thread.sleep(20);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    }
}

Base64编码/解码

package org.binbin.container.panel;

import javax.swing.*;
import java.awt.*;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Base64;

/**
 * 
 * Copyright © 启明星辰 版权所有
 *
 * @author 胡海斌/hu_haibin@venusgroup.com.cn
 * 2023/10/27 11:30
 */
public class Base64Panel extends JPanel implements ActionListener {
    private JButton[] buttons;
    private String[] buttonNames = {"编码", "解码", "复制", "清空"};

    private JTextArea sourceTextArea;
    private JTextArea targetTextArea;

    public Base64Panel() {
        setLayout(new BorderLayout());

        sourceTextArea = new JTextArea(10, 20);
        targetTextArea = new JTextArea(10, 20);
        sourceTextArea.setLineWrap(true);
        targetTextArea.setLineWrap(true);
        sourceTextArea.setMargin(new Insets(10, 10, 10, 10));
        targetTextArea.setMargin(new Insets(10, 10, 10, 10));
        targetTextArea.setEditable(false);

        Box box=Box.createHorizontalBox();
        box.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
        box.add(new JScrollPane(sourceTextArea));
        box.add(Box.createHorizontalStrut(10));
        box.add(new JLabel("==>", JLabel.CENTER));
        box.add(Box.createHorizontalStrut(10));
        box.add(new JScrollPane(targetTextArea));
        add(box, BorderLayout.CENTER);

        JPanel buttonPanel = new JPanel();
        buttons = new JButton[buttonNames.length];
        for (int i = 0; i < buttons.length; i++) {
            buttons[i] = new JButton(buttonNames[i]);
            buttons[i].addActionListener(this);
            buttonPanel.add(buttons[i]);
        }
        add(buttonPanel, BorderLayout.SOUTH);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        switch (e.getActionCommand()) {
            case "编码":
                try {
                    String text = sourceTextArea.getText();
                    String result = Base64.getEncoder().encodeToString(text.getBytes("UTF-8"));
                    targetTextArea.setText(result);
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
                break;
            case "解码":
                try {
                    String text = sourceTextArea.getText();
                    String result = new String(Base64.getDecoder().decode(text), "UTF-8");
                    targetTextArea.setText(result);
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
                break;
            case "复制":
                try {
                    String text = targetTextArea.getText();
                    Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
                    clipboard.setContents(new StringSelection(text), null);
                    JOptionPane.showMessageDialog(this, "复制成功!", "结果", JOptionPane.INFORMATION_MESSAGE);
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
                break;
            case "清空":
                sourceTextArea.setText("");
                targetTextArea.setText("");
                break;
        }
    }
}

URL编码/解码

package org.binbin.container.panel;

import javax.swing.*;
import java.awt.*;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
import java.awt.event.ActionListener;
import java.net.URLDecoder;
import java.net.URLEncoder;

/**
 * 
 * Copyright © 启明星辰 版权所有
 *
 * @author 胡海斌/hu_haibin@venusgroup.com.cn
 * 2023/10/28 11:30
 */
public class UrlPanel extends JPanel {
    private JButton[] buttons;
    private String[] buttonNames = {"编码", "解码", "复制", "清空"};

    private JTextArea sourceTextArea;
    private JTextArea targetTextArea;

    public UrlPanel() {
        setLayout(new BorderLayout());

        Box box=Box.createHorizontalBox();
        box.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
        sourceTextArea = new JTextArea(10, 20);
        targetTextArea = new JTextArea(10, 20);
        sourceTextArea.setLineWrap(true);
        targetTextArea.setLineWrap(true);
        sourceTextArea.setMargin(new Insets(10, 10, 10, 10));
        targetTextArea.setMargin(new Insets(10, 10, 10, 10));
        targetTextArea.setEditable(false);
        box.add(new JScrollPane(sourceTextArea));
        box.add(Box.createHorizontalStrut(10));
        box.add(new JLabel("==>", JLabel.CENTER));
        box.add(Box.createHorizontalStrut(10));
        box.add(new JScrollPane(targetTextArea));
        add(box, BorderLayout.CENTER);

        JPanel buttonPanel = new JPanel();
        buttons = new JButton[buttonNames.length];
        ActionListener listener = e -> {
            switch (e.getActionCommand()) {
                case "编码":
                    try {
                        String text = sourceTextArea.getText();
                        String result = URLEncoder.encode(text, "UTF-8");
                        targetTextArea.setText(result);
                    } catch (Exception ex) {
                        ex.printStackTrace();
                    }
                    break;
                case "解码":
                    try {
                        String text = sourceTextArea.getText();
                        String result = URLDecoder.decode(text, "UTF-8");
                        targetTextArea.setText(result);
                    } catch (Exception ex) {
                        ex.printStackTrace();
                    }
                    break;
                case "复制":
                    try {
                        String text = targetTextArea.getText();
                        Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
                        clipboard.setContents(new StringSelection(text), null);
                        JOptionPane.showMessageDialog(this, "复制成功!", "结果", JOptionPane.INFORMATION_MESSAGE);
                    } catch (Exception ex) {
                        ex.printStackTrace();
                    }
                    break;
                case "清空":
                    sourceTextArea.setText("");
                    targetTextArea.setText("");
                    break;
            }
        };
        for (int i = 0; i < buttons.length; i++) {
            buttons[i] = new JButton(buttonNames[i]);
            buttons[i].addActionListener(listener);
            buttonPanel.add(buttons[i]);
        }
        add(buttonPanel, BorderLayout.SOUTH);
    }
}

JSON格式化

package org.binbin.container.panel;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson2.JSONObject;

import javax.swing.*;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import java.awt.*;
import java.awt.datatransfer.Clipboard;
import java.awt.datatransfer.StringSelection;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * 
 * Copyright © 启明星辰 版权所有
 *
 * @author 胡海斌/hu_haibin@venusgroup.com.cn
 * 2023/11/1 14:38
 */
public class JsonPanel extends JPanel implements ActionListener, DocumentListener {
    private JButton[] buttons;
    private String[] buttonNames = {"复制", "清空"};

    private JTextArea sourceTextArea;
    private JTextArea targetTextArea;

    public JsonPanel() {
        setLayout(new BorderLayout());

        sourceTextArea = new JTextArea(10, 20);
        targetTextArea = new JTextArea(10, 20);
        sourceTextArea.setLineWrap(true);
        targetTextArea.setLineWrap(true);
        sourceTextArea.setMargin(new Insets(10, 10, 10, 10));
        targetTextArea.setMargin(new Insets(10, 10, 10, 10));
        sourceTextArea.setTabSize(2);
        targetTextArea.setTabSize(2);
        targetTextArea.setEditable(false);

        Box box=Box.createHorizontalBox();
        box.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
        box.add(new JScrollPane(sourceTextArea));
        box.add(Box.createHorizontalStrut(10));
        box.add(new JLabel("==>", JLabel.CENTER));
        box.add(Box.createHorizontalStrut(10));
        box.add(new JScrollPane(targetTextArea));
        add(box, BorderLayout.CENTER);

        JPanel buttonPanel = new JPanel();
        buttons = new JButton[buttonNames.length];
        for (int i = 0; i < buttons.length; i++) {
            buttons[i] = new JButton(buttonNames[i]);
            buttons[i].addActionListener(this);
            buttonPanel.add(buttons[i]);
        }
        add(buttonPanel, BorderLayout.SOUTH);

        sourceTextArea.getDocument().addDocumentListener(this);
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        switch (e.getActionCommand()) {
            case "复制":
                try {
                    String text = targetTextArea.getText();
                    Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
                    clipboard.setContents(new StringSelection(text), null);
                    JOptionPane.showMessageDialog(this, "复制成功!", "结果", JOptionPane.INFORMATION_MESSAGE);
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
                break;
            case "清空":
                sourceTextArea.setText("");
                targetTextArea.setText("");
                break;
        }
    }

    private void format() {
        try {
            String text = sourceTextArea.getText();
            if(text == null || text.trim().equals("")) {
                return;
            }
            JSONObject object = JSONObject.parseObject(text);
            String pretty = JSON.toJSONString(object, SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue, SerializerFeature.WriteDateUseDateFormat);
            targetTextArea.setText(pretty);
        } catch (Exception ex) {
            targetTextArea.setText("");
        }
    }

    @Override
    public void insertUpdate(DocumentEvent documentEvent) {
        format();
    }

    @Override
    public void removeUpdate(DocumentEvent documentEvent) {
        format();
    }

    @Override
    public void changedUpdate(DocumentEvent documentEvent) {
        format();
    }
}

工具类

package org.binbin.util;

import javax.swing.*;
import java.awt.*;

/**
 * 
 * Copyright © 启明星辰 版权所有
 *
 * @author 胡海斌/hu_haibin@venusgroup.com.cn
 * 2023/10/28 11:05
 */
public class FrameUtil {

    public static void center(JFrame frame) {
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        frame.setLocation((screenSize.width - frame.getWidth()) / 2, (screenSize.height - frame.getHeight()) / 2);
    }
}

主窗体

package org.binbin.container;

import org.binbin.container.panel.Base64Panel;
import org.binbin.container.panel.JsonPanel;
import org.binbin.container.panel.TimePanel;
import org.binbin.container.panel.UrlPanel;
import org.binbin.util.FrameUtil;

import javax.swing.*;
import java.awt.event.KeyEvent;

/**
 * 
 * Copyright © 启明星辰 版权所有
 *
 * @author 胡海斌/hu_haibin@venusgroup.com.cn
 * 2023/10/28 10:59
 */
public class MainFrame extends JFrame {
    private static final String[] titles = new String[]{"时间戳转换", "Base64编码/解码", "URL编码/解码", "JSON格式化"};
    private JTabbedPane tabbedPane;

    private JPanel base64Panel;
    private JPanel urlPanel;
    private TimePanel timePanel;
    private JsonPanel jsonPanel;

    public MainFrame() {
        setTitle("工具箱 v1.0");
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setSize(600, 400);
        FrameUtil.center(this);

        JMenuBar bar = new JMenuBar();
        setJMenuBar(bar);
        JMenu featureMenu = new JMenu("功能(F)");
        featureMenu.setMnemonic(KeyEvent.VK_F);
        for (int i = 0; i < titles.length; i++) {
            JMenuItem item = new JMenuItem(titles[i]);
            final int index = i;
            item.addActionListener(e -> {
                if(tabbedPane.getSelectedIndex() == 0) {
                    timePanel.init();
                }
                tabbedPane.setSelectedIndex(index);
            });
            featureMenu.add(item);
        }

        featureMenu.addSeparator();
        JMenuItem exitItem = new JMenuItem("退出(E)");
        exitItem.setMnemonic(KeyEvent.VK_E);
        exitItem.addActionListener(e -> {
            System.exit(0);
        });
        featureMenu.add(exitItem);

        bar.add(featureMenu);

        JMenu helpMenu = new JMenu("帮助(H)");
        helpMenu.setMnemonic(KeyEvent.VK_H);
        JMenuItem aboutItem = new JMenuItem("关于(A)");
        aboutItem.setMnemonic(KeyEvent.VK_A);
        aboutItem.addActionListener(e -> {
            String msg = "<html><body><p style='font-weight:bold;font-size:14px;'>工具箱 v1.0</p><br/><p style='font-weight:normal'>作者:斌斌<br/>邮箱:hello@test.com<br/>日期:2023/09/28<br/><br/>欢迎您使用本工具箱!如果有什么建议,请给作者发邮件。</p></body></html>";
            JOptionPane.showMessageDialog(this, msg, "关于", JOptionPane.INFORMATION_MESSAGE);
        });
        helpMenu.add(aboutItem);
        bar.add(helpMenu);

        tabbedPane = new JTabbedPane();
        add(tabbedPane);

        base64Panel = new Base64Panel();
        urlPanel = new UrlPanel();
        timePanel = new TimePanel();
        jsonPanel = new JsonPanel();

        tabbedPane.add(titles[0], timePanel);
        tabbedPane.add(titles[1], base64Panel);
        tabbedPane.add(titles[2], urlPanel);
        tabbedPane.add(titles[3], jsonPanel);
        tabbedPane.addChangeListener(e -> {
            if(tabbedPane.getSelectedIndex() == 2) {
                timePanel.init();
            }
        });
    }
}

启动类

package org.binbin;

import org.binbin.container.MainFrame;

import java.awt.*;

/**
 * 小工具
 * @author binbin
 * 2023/10/27 11:30
 */
public class App
{
    public static void main( String[] args )
    {
        EventQueue.invokeLater(() -> {
            new MainFrame().setVisible(true);
        });
    }
}

pom.xml

<?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>

  <groupId>org.hbin</groupId>
  <artifactId>tool</artifactId>
  <version>1.0-SNAPSHOT</version>

  <name>info</name>
  <url>www.binbin.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
  </properties>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.alibaba</groupId>
      <artifactId>fastjson</artifactId>
      <version>2.0.32</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!-- 使用maven-assembly-plugin插件打包 -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.binbin.App</mainClass>
            </manifest>
          </archive>
          <descriptorRefs>
            <!-- 可执行jar名称结尾-->
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!--配置生成Javadoc包-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <configuration>
          <!--指定编码为UTF-8-->
          <encoding>UTF-8</encoding>
          <aggregate>true</aggregate>
          <charset>UTF-8</charset>
          <docencoding>UTF-8</docencoding>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!--配置生成源码包-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

运行效果图

1. 菜单栏

在这里插入图片描述

2. 关于

在这里插入图片描述

3. 功能页面

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【verilog】verilog语法刷题知识点总结

verilog语法刷题知识点总结 1.状态机2.任务和函数的区别3.case&#xff0c;casez和casex4.随机数产生关键字5.运算符优先级6.特殊运算符(1)移位运算符(2)等式运算符(3)动态位宽截取运算符 7.testbench知识点 1.状态机 &#xff08;1&#xff09;三段式状态机的组成&#xff1a…

Vue.Draggable 踩坑:add 事件与 change 事件中 newIndex 字段不同之谜

背景 最近在弄自定义表单&#xff0c;需要拖动组件进行表单设计&#xff0c;所以用到了 Vue.Draggable(中文文档)。Vue.Draggable 是一款基于 Sortable.js 实现的 vue 拖拽插件&#xff0c;文档挺简单的&#xff0c;用起来也方便&#xff0c;但没想到接下来给我遇到了灵异事件……

钉钉API与集简云无代码开发连接:电商平台与营销系统的自动化集成

连接科技与能源&#xff1a;钉钉API与集简云的一次集成尝试 在数字化时代&#xff0c;许多公司面临着如何将传统的工作方式转变为更智能、高效的挑战。某能源科技有限公司也不例外&#xff0c;他们是一家专注于能源科技领域的公司&#xff0c;产品包括节能灯具、光伏逆变器、电…

山西电力市场日前价格预测【2023-11-11】

日前价格预测 ​ 预测说明&#xff1a; 如上图所示&#xff0c;预测明日&#xff08;2023-11-11&#xff09;山西电力市场全天平均日前电价为311.30元/MWh。其中&#xff0c;最高日前电价为417.73元/MWh&#xff0c;预计出现在08: 00。最低日前电价为151.48元/MWh&#xff0c…

媒体转码软件Media Encoder 2024 mac中文版功能介绍

Media Encoder 2024 mac是一款媒体转码软件&#xff0c;它可以将视频从一种格式转码为另一种格式&#xff0c;支持H.265、HDR10等多种编码格式&#xff0c;同时优化了视频质量&#xff0c;提高了编码速度。此外&#xff0c;Media Encoder 2024还支持收录、创建代理和输出各种格…

Spark 读取ES采坑系列

目录 一、使用的插件 二、ES集群和Elasticsearch-hadoop版本问题 三、Elasticsearch-hadoop 和Scala版本以及Spark版本&#xff08;版本不匹配会有各种异常信息 一、使用的插件 <dependency><groupId>org.elasticsearch</groupId><artifactId>elas…

广告原生化发展,助力开发者收益更上一层楼

什么是原生广告&#xff1f; 原生广告&#xff0c;Native Advertising (Native Ads)&#xff0c;有广义和狭义之分&#xff0c;广义的原生广告是一种让广告作为内容的一部分植入到实际页面设计中的广告形式&#xff0c;狭义的原生广告是指通过在信息流里发布具有相关性内容的广…

史上最细,Jenkins插件Allure生成自动化测试报告详细...

目录&#xff1a;导读 前言一、Python编程入门到精通二、接口自动化项目实战三、Web自动化项目实战四、App自动化项目实战五、一线大厂简历六、测试开发DevOps体系七、常用自动化测试工具八、JMeter性能测试九、总结&#xff08;尾部小惊喜&#xff09; 前言 1、Allure介绍 A…

浅谈安科瑞直流表在沙特基站的应用

摘要&#xff1a;本文介绍了安科瑞直流电表在沙特基站的应用。主要用于沙特某基站的电流电压电能的计量&#xff0c;配合分流器对基站进行计量。 Abstract: This article introduces the application of Acrel DC meters in base station in Saudi Arabia.The device is meas…

CDN是什么?

一.CDN的概念 内容分发网络&#xff08;Content Delivery Network&#xff0c;简称CDN&#xff09;是建立并覆盖在承载网之上&#xff0c;由分布在不同区域的边缘节点服务器群组成的分布式网络。CDN应用广泛&#xff0c;支持多种行业、多种场景内容加速&#xff0c;例如&#…

导轨式安装压力应变桥信号处理差分信号输入转换变送器0-10mV/0-20mV/0-±10mV/0-±20mV转0-5V/0-10V/4-20mA

主要特性 DIN11 IPO 压力应变桥信号处理系列隔离放大器是一种将差分输入信号隔离放大、转换成按比例输出的直流信号导轨安装变送模块。产品广泛应用在电力、远程监控、仪器仪表、医疗设备、工业自控等行业。此系列模块内部嵌入了一个高效微功率的电源&#xff0c;向输入端和输…

单链表(5)

判空函数 *一进函数先断言 获取数据结点的个数函数 如图&#xff0c;p->nextNULL就跳出的话&#xff0c;当前p->data就没算上。 现在来测试一下 同样在空表时也调用一下 还有这样写的&#xff0c;出来的结果也是一样的&#xff0c;它也算是对的——但是&#xff0c;这是…

深度学习 opencv python 实现中国交通标志识别 计算机竞赛

文章目录 0 前言1 yolov5实现中国交通标志检测2.算法原理2.1 算法简介2.2网络架构2.3 关键代码 3 数据集处理3.1 VOC格式介绍3.2 将中国交通标志检测数据集CCTSDB数据转换成VOC数据格式3.3 手动标注数据集 4 模型训练5 实现效果5.1 视频效果 6 最后 0 前言 &#x1f525; 优质…

第九章 排序【数据结构】【精致版】

第九章 排序【数据结构】【精致版】 前言版权第九章 排序9.1 概述9.2 插入类排序9.2.1 直接插入排序**1-直接插入排序.c** 9.2.2 折半插入排序**2-折半插入排序.c** 9.2.3 希尔排序 9.3 交换类排序9.3.1冒泡排序**4-冒泡排序.c** 9.3.2 快速排序**5-快速排序.c** 9.4 选择类排…

基于SSM的自习室预订座位管理系统设计与实现

末尾获取源码 开发语言&#xff1a;Java Java开发工具&#xff1a;JDK1.8 后端框架&#xff1a;SSM 前端&#xff1a;Vue 数据库&#xff1a;MySQL5.7和Navicat管理工具结合 服务器&#xff1a;Tomcat8.5 开发软件&#xff1a;IDEA / Eclipse 是否Maven项目&#xff1a;是 目录…

DHorse(K8S的CICD平台)的实现原理

综述 首先&#xff0c;本篇文章所介绍的内容&#xff0c;已经有完整的实现&#xff0c;可以参考这里。 在微服务、DevOps和云平台流行的当下&#xff0c;使用一个高效的持续集成工具也是一个非常重要的事情。虽然市面上目前已经存在了比较成熟的自动化构建工具&#xff0c;比如…

2.前端调试(控制台使用)

消息堆叠 如果一条消息连续重复&#xff0c;而不是在新行上输出每一个消息实例&#xff0c;控制台将“堆叠”消息并在左侧外边距显示一个数字。此数字表示该消息已重复的次数。 如果您倾向于为每一个日志使用一个独特的行条目&#xff0c;请在 DevTools 设置中启用 Show times…

银行余额修改生成器,虚拟农业建设工商邮政中国,画板+取快照生成png高清图

在网上找了很多模版&#xff0c;一共好几个&#xff0c;然后都插入到了图片资源库里面&#xff0c;点击指定的单选框就会自动更换易语言画板上面的图片&#xff0c;然后模版上面都对应了指定的标签【透明状态覆盖了原有的字符】&#xff0c;然后在指定的参数上面对应加入了指定…

小甲鱼python零基础入门学习(一)

目录 一、环境搭建和课程介绍 &#xff08;1&#xff09;安装最新版本的python3.x &#xff08;2&#xff09;安装编辑器&#xff08;找合适自己的&#xff09; 二、用python设计第一个游戏 三、变量和字符串 &#xff08;1&#xff09;变量 &#xff08;2&#xff09;字…

PTA_乙级_1096

Q1&#xff1a;因数 在数学中&#xff0c;一个数的因数是能够整除该数的整数。换句话说&#xff0c;如果我们将一个数 a 除以另一个整数 b 而得到整数商&#xff0c;那么 b 就是 a 的因数。以下是一些例子&#xff1a; 1.因数的定义&#xff1a; 如果整数 b 可以被整数 a 整除&…