四时宝库

程序员的知识宝库

美化Excel表格6招,从此让老板喜你做的表格!

学Excel必须知道扩展名!相互之间如何转换?

测试开发 | 使用Extent report美化单元测试框架TestNG的报告

jUnit是Java领域事实上的单元测试框架标准,但是TestNG也有其特点,所以在单元测试或者自动化测试里面也占有一席之地,从google趋势上看,大体是3:1:

前面的文章我们提到,Allure作为开源的测试报告框架,原生提供了对TestNG的支持;Extent report作为另外一款常用报告框架,也通过适配器(extentreports-testng-adapter)的形式提供了TestNG的支持,注意,没有jUnit哦:)下面的文章会覆盖如下几个点:

鸿蒙推箱子小游戏:UI界面美化(鸿蒙游戏盒子)

?在上文笔者向大家分享了推箱子小游戏基础功能的实现??,本文将继续向大家介绍如何做 UI 界面美化,以及如何利用轻量级偏好数据库做数据的存储和读取。

UI 界面美化

Python读写xml(xml,lxml)Edge 浏览器插件 WebTab - 免费ChatGPT

Python读写xml(xml,lxml)Edge 浏览器插件 WebTab - 免费ChatGPT

  • XML
    • 一、xml文件创建

手把手教你微信美化 史上最完整版教程 学完你也可以成为大神

今天给大家带来的是微信美化教程 全是都是干货

好了 教程开始吧


教程一微信格式美化教程:

工具:MT管理器二代

ps制图软件


首先讲一下ID

ID很重要 有些小白找不到替换ID的办法 导致主图不显示经常去第二次修改

这里给大家提供一个图片的id做参考

(切图笔记)通用的纯css3实现 单选框 复选框 的美化 附代码 亲测好用

切图笔记记录切图网日常,说到网页的表单美化 通常需要用到插件,因为 select,radio,checkbox比较特殊,无法通过css直接美化 ,这些也有比较不错的美化插件 可以实现,不过这都是早几年的情况,现在浏览器日益更新升级,对于html5 css3标准支持的更好,使得我们现在可以通过css3也可以进行美化,没有插件参与,就可以省事不少,同时也可以让页面代码更加简洁,用到了图片背景,不过是基于data:image 方式直接引用的,所以不用到实体图片。

更具形式美的二维码工具(更具形式美的二维码工具有哪些)

关于二维码,之前有简单提过“包容万物”的 草料二维码 https://cli.im/


草料二维码可以将文本、网址、文件、图片、音视频等内容,储存在小小的二维码中,并且在不改变二维码图案的前提下,可以随时更改存储的内容。


那么二维码为什么可以“存储”那么多的内容?又为什么可以随时更改呢?先来了解一些基础知识吧~

二维码在线生成器哪些比较好用?二维码 生成器有哪些?

二维码在线生成器哪些比较好用?

随着数字化时代的到来,二维码已经成为人们日常生活中必不可少的一部分。它可以用于信息传递、商品销售、用户身份验证等多种场景,因此,二维码在线生成器也变得越来越受欢迎。

工具类:Java版本二维码生成以及解码

有时候我们经常会想要实现二维码批量生成的功能,这里提供一个二维码生成以及解析的工具类,包括可以上传logo,代码如下:

/**
 * 二维码工具类
 * @date 20198年10月31日
 * @version 1.0
 */
public class QRCodeUtils {
    // 二维码大小
    private static final int QRCODE_SIZE = 300;  
    // 二维码中间logo的尺寸
    private static final int WIDTH  = 60;
    private static final int HEIGHT = 60;
    public static void encode(String content, String logoPath, String imgPath)  throws Exception {  
        encode(content, logoPath, imgPath, QRCODE_SIZE, 1);  
    }
    public static void encode(String content, String logoPath, String imgPath, int size, int margin)  throws Exception {  
        BufferedImage image = createImage(content, logoPath, size, margin);  
        ImageIO.write(image, "png", new File(imgPath));  
    }
    public static void encode(String content, String logoPath, OutputStream output) throws Exception {  
        encode(content, logoPath, output, QRCODE_SIZE, 1);
    }
    public static void encode(String content, String logoPath, OutputStream output, int size, int margin) throws Exception {  
        BufferedImage image = createImage(content, logoPath, size, margin);  
        ImageIO.write(image, "png", output);  
    }
    private static BufferedImage createImage(String content, String imgPath, int size, int margin) throws Exception {  
        Hashtable<EncodeHintType, Object> hints = new Hashtable<EncodeHintType, Object>();  
        hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);  
        hints.put(EncodeHintType.CHARACTER_SET, "UTF-8");  
        hints.put(EncodeHintType.MARGIN, margin); 
        BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, size, size, hints); 
        int[] rec = bitMatrix.getEnclosingRectangle();  
        int resWidth  = rec[2] + 1;  
        int resHeight = rec[3] + 1;  
        BitMatrix resMatrix = new BitMatrix(resWidth, resHeight);  
        resMatrix.clear();  
        for (int i = 0; i < resWidth; i++) {  
            for (int j = 0; j < resHeight; j++) {  
                if (bitMatrix.get(i + rec[0], j + rec[1])) { 
                     resMatrix.set(i, j); 
                } 
            }  
        }  
        int width  = bitMatrix.getWidth();  
        int height = bitMatrix.getHeight();  
        BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);  
        for (int x = 0; x < width; x++) {  
            for (int y = 0; y < height; y++) {  
                image.setRGB(x, y, bitMatrix.get(x, y) ? 0xFF000000 : 0xFFFFFFFF);  
            }  
        }  
        if (imgPath == null || "".equals(imgPath)) {  
            return image;  
        }  
        // 插入图片  
        insertImage(image, imgPath, size);  
        return image;  
    }  
    private static void insertImage(BufferedImage source, String imgPath, int size) throws Exception {  
        File file = new File(imgPath);  
        if (!file.exists()) {  
            System.out.println(""+imgPath+"   该文件不存在!");  
            return;  
        }  
        Image src  = ImageIO.read(new File(imgPath));  
        int width  = src.getWidth(null);  
        int height = src.getHeight(null);
        // 压缩LOGO
        if (width > WIDTH) {  
            width = WIDTH;  
        }  
        if (height > HEIGHT) {  
            height = HEIGHT;  
        }  
        Image image = src.getScaledInstance(width, height, Image.SCALE_SMOOTH);  
        BufferedImage tag = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);  
        Graphics g = tag.getGraphics();  
        g.drawImage(image, 0, 0, null); // 绘制缩小后的图  
        g.dispose();  
        src = image;  
        // 插入LOGO  
        Graphics2D graph = source.createGraphics();  
        int x = (size - width) / 2;  
        int y = (size - height) / 2;  
        graph.drawImage(src, x, y, width, height, null);  
        Shape shape = new RoundRectangle2D.Float(x, y, width, width, 6, 6);  
        graph.setStroke(new BasicStroke(3f));  
        graph.draw(shape);  
        graph.dispose();  
    }  
    public static String decode(File file) throws Exception {  
        BufferedImage image;  
        image = ImageIO.read(file);  
        if (image == null) {  
            return null;  
        }  
        BufferedImageLuminanceSource source = new BufferedImageLuminanceSource(image);  
        BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer(source));  
        Result result;  
        Hashtable<DecodeHintType, Object> hints = new Hashtable<DecodeHintType, Object>();  
        hints.put(DecodeHintType.CHARACTER_SET, "UTF-8");  
        result = new MultiFormatReader().decode(bitmap, hints);  
        return result != null ? result.getText() : null;  
    }  
    public static void main(String[] args) throws Exception {
        QRCodeUtils.encode("https://www.suibibk.com/blog/579412311547052032/582955445098905600/639208466002477056", "e:/logo.jpg", "e:/qrcode.png");
        // 解析二维码存储的内容并打印
        System.out.println(decode(new File("e:/qrcode.png")));
    }
}

那些超好用并且在Chrome商店超过10万用户的JSON格式化插件

原文链接:

https://www.lskyf.com/post/51

JSON Formatter

下载地址

http://cj.lskyf.com/mhimpmpmffogbmmkmajibklelopddmjf.html

用户数:989,391 4.5星 推荐理由:没有跟踪,没有广告,没有别的邪恶。

控制面板
您好,欢迎到访网站!
  查看权限
网站分类
最新留言
    友情链接