Python读写xml(xml,lxml)Edge 浏览器插件 WebTab - 免费ChatGPT
- XML
- 一、xml文件创建
2024年08月06日
2024年08月06日
今天给大家带来的是微信美化教程 全是都是干货
好了 教程开始吧
教程一微信格式美化教程:
工具:MT管理器二代
ps制图软件
首先讲一下ID
ID很重要 有些小白找不到替换ID的办法 导致主图不显示经常去第二次修改
这里给大家提供一个图片的id做参考
2024年08月06日
切图笔记记录切图网日常,说到网页的表单美化 通常需要用到插件,因为 select,radio,checkbox比较特殊,无法通过css直接美化 ,这些也有比较不错的美化插件 可以实现,不过这都是早几年的情况,现在浏览器日益更新升级,对于html5 css3标准支持的更好,使得我们现在可以通过css3也可以进行美化,没有插件参与,就可以省事不少,同时也可以让页面代码更加简洁,用到了图片背景,不过是基于data:image 方式直接引用的,所以不用到实体图片。
2024年08月06日
关于二维码,之前有简单提过“包容万物”的 草料二维码 https://cli.im/
草料二维码可以将文本、网址、文件、图片、音视频等内容,储存在小小的二维码中,并且在不改变二维码图案的前提下,可以随时更改存储的内容。
那么二维码为什么可以“存储”那么多的内容?又为什么可以随时更改呢?先来了解一些基础知识吧~
2024年08月06日
二维码在线生成器哪些比较好用?
随着数字化时代的到来,二维码已经成为人们日常生活中必不可少的一部分。它可以用于信息传递、商品销售、用户身份验证等多种场景,因此,二维码在线生成器也变得越来越受欢迎。
2024年08月06日
有时候我们经常会想要实现二维码批量生成的功能,这里提供一个二维码生成以及解析的工具类,包括可以上传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")));
}
}
2024年08月06日
https://www.lskyf.com/post/51
下载地址
http://cj.lskyf.com/mhimpmpmffogbmmkmajibklelopddmjf.html
用户数:989,391 4.5星 推荐理由:没有跟踪,没有广告,没有别的邪恶。
2024年08月06日
2024年08月06日
二维码在线生成器如何使用?长连接转化成短连接如何实现
随着互联网的发展,人们使用网络的方式也越来越多样化。其中,二维码成为了人们连接网络的一种重要方式。下面,我们将介绍二维码在线生成器以及如何将长连接转化成短连接。
2024年08月06日
ZXing.NET 是一个开源的、功能强大的二维码处理库,它能够对二维码进行解码(读取信息)和编码(生成二维码)。ZXing 是 "Zebra Crossing" 的缩写,是一个跨平台的、用于解码和生成条形码和二维码的库。以下是一些 ZXing.Net 的主要功能通过实例讲解。