春天的水仙花在清晨绽放 (© LedyX/Shutterstock)

Welcom to 评论 - lizhenqiu blog!

    #1

    作者:湖北省武汉市
    新商户只能用公钥,不能用证书了,这个怎么处理呀
    #,广西崇左市,2025-03-05,22:20:39, 根据微信支付的最新政策,新商户在接入微信支付时,只能使用公钥进行签名和验证,而不再支持使用证书。这一变化主要是为了提高支付接口的安全性和简化开发流程。对于开发者来说,处理方式如下:

    1. 确认使用公钥模式
    在接入微信支付时,确保选择公钥模式(RSA 或 RSA2)进行签名和验证。微信支付官方文档会提供详细的公钥生成和使用方法。

    2. 生成公钥和私钥
    使用工具生成 RSA 密钥对(公钥和私钥)。
    将生成的公钥上传到微信商户平台。
    保留好私钥,用于在本地生成签名。
    生成密钥对的工具:

    OpenSSL
    在线生成工具(注意安全性)
    编程语言中的加密库(如 Python 的 cryptography 库)
    生成 RSA 密钥对的命令(OpenSSL):
    # 生成私钥 openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048 # 从私钥中提取公钥 openssl rsa -in private_key.pem -pubout -out public_key.pem
    Run code
    Cut to clipboard


      3. 上传公钥到微信商户平台
      登录微信商户平台,进入「API安全」页面。
      找到「API 密钥」或「公钥管理」,将生成的 public_key.pem 文件内容上传。
      4. 在代码中使用私钥进行签名
      在开发过程中,使用本地保存的私钥对请求数据进行签名。
      将签名结果作为请求参数发送给微信支付 API。
      Python 示例:
      from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding from cryptography.hazmat.primitives import serialization # 加载私钥 with open("private_key.pem", "rb") as key_file: private_key = serialization.load_pem_private_key( key_file.read(), password=None ) # 待签名字符串 data_to_sign = "your_data_to_sign" # 生成签名 signature = private_key.sign( data_to_sign.encode('utf-8'), padding.PKCS1v15(), hashes.SHA256() ) # 将签名转换为 Base64 编码 import base64 signature_base64 = base64.b64encode(signature).decode('utf-8') print("Signature:", signature_base64)
      Run code
      Cut to clipboard


        5. 验证微信支付的回调
        当微信支付回调时,使用微信支付提供的公钥验证回调数据的签名。
        确保回调数据未被篡改。
        Python 示例:
        from cryptography.hazmat.primitives import hashes from cryptography.hazmat.primitives.asymmetric import padding from cryptography.hazmat.primitives import serialization # 加载微信支付的公钥 with open("wechat_public_key.pem", "rb") as key_file: public_key = serialization.load_pem_public_key( key_file.read() ) # 回调数据和签名 callback_data = "your_callback_data" received_signature = base64.b64decode("received_signature_base64") # 验证签名 try: public_key.verify( received_signature, callback_data.encode('utf-8'), padding.PKCS1v15(), hashes.SHA256() ) print("Signature is valid") except Exception as e: print("Signature is invalid:", e)
        Run code
        Cut to clipboard


          6. 注意事项
          私钥安全:私钥是核心敏感数据,必须妥善保管,切勿泄露。
          公钥格式:上传到微信商户平台的公钥必须是 PEM 格式。
          签名算法:微信支付支持 RSA 和 RSA2 算法,推荐使用 RSA2(SHA-256)。
          版本兼容性:确保使用的 SDK 或库支持公钥模式。

          7. 参考文档
          微信支付官方文档:https://pay.weixin.qq.com/wiki/doc/apiv3/wechatpay/wechatpay4_0.shtml
          微信支付 API 安全指南:https://pay.weixin.qq.com/wiki/doc/apiv3/wechatpay/wechatpay4_1.shtml
          通过以上步骤,你可以顺利完成微信支付的公钥模式接入。如果遇到问题,可以参考微信支付官方文档或联系微信支付技术支持。
          文章:PHP 微信支付V3  发表时间:2025-03-05, 14:56:03  
          展开↯

          #2

          作者:广西百色市
          html5手机键盘修改换行为提交文字
          h5修改软键盘文字,将换行改为前往或发送

          在H5中,可以使用`enterkeyhint`属性来修改软键盘右下角的回车键行为,
          例如将其设置为go、send等,以实现将回车键显示为‘前往’或‘发送’的效果。
          此属性支持的值包括enter、done、go、next、previous、search和send,
          可以根据需求选择合适的行为。

          怎么修改h5软键盘的文字,将右下角的回车换行更改为前往或发送

          文档中很多都是修改为前往,搜索,提交等。
          修改的<input type="search" />属性,
          其实还是有另外一个属性的:enterkeyhint
          <input enterkeyhint="enter"> <input enterkeyhint="done"> <input enterkeyhint="go"> <input enterkeyhint="next"> <input enterkeyhint="previous"> <input enterkeyhint="search"> <input enterkeyhint="send">
          Run code
          Cut to clipboard

            文章:移动设备(触屏设备)禁止放大缩小网页  发表时间:2025-02-26, 17:03:58  
            展开↯

            #3

            作者:广西百色市
            js加密压缩出现bug
            JavaScript代码压缩后报错

            不严谨写法:
            //变量定义 var time = 100 var st = 250 //压缩后代码变成 var time = 100var st = 250
            Run code
            Cut to clipboard


              会出现错误信息:
              VM30:1 Uncaught SyntaxError: Invalid or unexpected token

              正确写法:
              //变量定义 var time = 100; var st = 250; //压缩后代码变成 var time = 100;var st = 250;
              Run code
              Cut to clipboard

                运行正常。

                0x1、for、if 函数之间缺少“{}”符号
                不严谨写法:
                function demo(type,array){ var result = ""; if(type === 1) return "1" else if(type ===2 ) return "1" else if(array && array.length > 0 ) return "array length gt 0" else return "array length = 0" }
                Run code
                Cut to clipboard


                  压缩后:
                  ;function method1(type,array){var result="";if(type===1)return"1"else if(type===2)return"1"else if(array&&array.length>0)return"array length gt 0"else return"array length = 0"};
                  Run code
                  Cut to clipboard


                    会出现报错信息:
                    VM401:1 Uncaught SyntaxError: Unexpected token else

                    正确写法:
                    function method1(type,array){ var result = ""; if(type === 1) { return "1"; }else if(type ===2 ){ return "1"; }else{ if(array && array.length > 0 ){ return "array length gt 0"; }else{ return "array length = 0"; } } }
                    Run code
                    Cut to clipboard

                      所以在平时写代码中,不要为了方便减少必要的“{}”、“;”符号。

                      0x2、xxxx is not defined 错误原因及解决方法

                      JavaScript 加密混淆之后运行 xxxx is not defined
                      Javascript 提示xxxx is not defined
                      0x0、xxxx is not defined 错误原因及解决方法
                      首先提示 xxxx is not defined 就是表示未定义

                      发生原因:
                      如果你确定加密之前已经定义了这个“变量名”或者“方法名”,那应该是加密后“变量名/方法名”已经发生改变,导致外部调用的时候找不到这个“方法名/变量名”,才会出错误。

                      如原来函数(方法)为:
                      function test(){ //todo }
                      Run code
                      Cut to clipboard

                        加密后函数(方法)可能为:
                        function _0xaoem(){ //todo }
                        Run code
                        Cut to clipboard

                          这个时候你去调用 “test” 那肯定是未定义(test is not defined)。

                          解决办法:
                          1.采用 最牛加密V6版本 ,保留 “变量名/方法名” 方法。
                          如方法名或者变量名为 “test” ,那就这么添加即可。
                          这样加密后,这个“变量名/方法名”不会发生改变。就不会出现这个错误问题。

                          2.提升作用域。
                          原来函数书写:
                          function test(){ //todo }
                          Run code
                          Cut to clipboard

                            改成:
                            test = function(){ //todo } // or window.test = function(){ //todo }
                            Run code
                            Cut to clipboard

                              这样随便怎么加密,这个 test 方法会一直存在,并且调用不会出现test is not defined。

                              3.正确的书写(采用闭包)
                              我们都见过jquery,jquery就是采用闭包的方式书写。
                              简单来讲就是私有化所有方法(函数)和变量,然后提供公共访问方式。

                              我们打个样:
                              (function(w) { //定义私有化对象 var T = {}; //绑定方法 T.test = function(){ //todo } //提供公共访问方式 w.T = T; })(window); //调用test T.test();
                              Run code
                              Cut to clipboard

                                这样随便怎么加密,您后面都可以使用 T 来调用绑定在T上面的方法(函数)及变量。

                                结语:
                                其实当我们在写代码的时候就要考虑到这些,方便后面自己调用或者其他人的使用。
                                所以从开始就要规划怎么写合适。

                                这种情况精简后查错的方法:
                                打开IE的脚本错误提示,然后打开调用JS的HTML页面,它会报告缺少分号的所在位置,
                                然后用UE打开精简后JS文件,转到相应位置加上分号,再找到未精简的JS代码中对应的位置加上分号。

                                例如:
                                  var a=1   var b=2
                                Run code
                                Cut to clipboard

                                  改为:
                                  Run code
                                  Cut to clipboard

                                      var a=1;
                                      var b=2;
                                    尽量在else后面的语句使用大括号 这种情况查错起来比较麻烦,通过正则表达式
                                    Run code
                                    Cut to clipboard
                                      else[a-zA-Z0-9]+
                                      来查找精简后的JS文件, 或者查找else后面是否有注释的行,再找到未精简的JS代码中对应的位置加上大括号。 例如:
                                      Run code
                                      Cut to clipboard

                                        if (a>b)
                                          a=b;
                                        else
                                          b=a;
                                        改为:
                                        Run code
                                        Cut to clipboard

                                          if (a>b)
                                            a=b;
                                          else
                                            {b=a}
                                          尽量在function的反大括号后都加上分号 例如:
                                          Run code
                                          Cut to clipboard
                                            function a() {
                                              }
                                              function b() {
                                              }
                                            改为:
                                            Run code
                                            Cut to clipboard
                                              function a() {
                                                };
                                                function b() {
                                                };
                                              这样压缩后才能解决压缩后报错的问题。 同时注意中文乱码的问题,可以不另存为文件而采用复制粘贴的方式。
                                              Run code
                                              Cut to clipboard
                                                window.load = function()
                                                  {
                                                  }
                                                  这样定义的,结尾一定要有分号。
                                                Run code
                                                Cut to clipboard
                                                  展开↯

                                                  #4

                                                  作者:广西百色市
                                                  tauri打包失败Error failed to bundle project: error running light.exe,是因为WiX Toolset不支持中文,
                                                  tauri 在 windows 下使用中文标题的问题修复

                                                  windows下编译tauri时报错奇怪的错误
                                                  error running light.exe

                                                  这个是因为中文字符造成的,目前仅在windows下发现,应该是wix(Windows Installer XML Toolset)的问题。

                                                  解决方案也很简单,直接编辑 src-tauri/tauri.conf.json,
                                                  找到 bundle -> windows,增加一个wix的配置即可。
                                                  "windows": { "wix": { "language": "zh-CN" },
                                                  Run code
                                                  Cut to clipboard


                                                    如果是其他语言,需要切换为对应的语言区域代码即可

                                                    示例如下
                                                    ​"bundle": { "active": true, "category": "Productivity", "copyright": "0ldm0s", "deb": { "depends": [] }, "externalBin": [], "icon": [ "icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico" ], "identifier": "su.tuu.admin", "longDescription": "", "macOS": { "entitlements": null, "exceptionDomain": "", "frameworks": [], "providerShortName": null, "signingIdentity": null }, "resources": [], "shortDescription": "", "targets": "all", "windows": { "wix": { "language": "zh-CN" }, "certificateThumbprint": null, "digestAlgorithm": "sha256", "timestampUrl": "" } }
                                                    Run code
                                                    Cut to clipboard


                                                      再次编译就正常结束了。
                                                      文章:tauri 在window平台打包遇到的问题  发表时间:2025-02-25, 18:41:09  
                                                      展开↯

                                                      #5

                                                      作者:广西南宁市
                                                      #,广西南宁市,2025-02-12,14:14:09, 不自家的东西才下得去手
                                                      #,广西南宁市,2025-02-13,11:56:04, 傻梦的经典作品还得是ABP-984,有带C的
                                                      9157D01C12310FBEED4C57BFA291AD5E9BC23F74
                                                      一般-c就是汉化版,机翻为主
                                                      #,广西南宁市,2025-02-13,14:23:36, 哪个畜生干的?把神秘代码给码住了?码底下的是DASS-425
                                                      #,广西南宁市,2025-02-13,14:45:31, 少年阿宾
                                                      #,广西南宁市,2025-02-13,14:46:14, https://e-hentai.org/g/2898423/34f753078b/
                                                      #,广西南宁市,2025-02-13,14:46:31, https://zh.xhamster.com/videos/innocent-young-student-duct-taped-and-fucked-in-her-tight-little-pussy-hole-xhjVXrY
                                                      #,广西南宁市,2025-02-13,14:46:44, https://theporndude.com/
                                                      #,广西南宁市,2025-02-13,14:47:22, https://javhd.today/static/porndude-one-of-the-best-resources-for-mainstream-porn-and-jav-sites-is-porndude/
                                                      #,广西南宁市,2025-02-14,16:07:27,

                                                      magnet:?xt=urn:btih:20FACF9F78F77DB02B799B907BE78E950E78A4A9
                                                      Run code
                                                      Cut to clipboard

                                                        前面加上magnet:?xt=urn:btih: 然后复制到下载软件
                                                        20FACF9F78F77DB02B799B907BE78E950E78A4A9
                                                        #,广西南宁市,2025-02-14,17:19:33, https://nhentai.net/
                                                        #,广西南宁市,2025-02-14,17:21:39, https://theporndude.com/zh/1709/nhentai
                                                        #,广西南宁市,2025-02-14,17:31:43, https://nhentai.com/zh/latest
                                                        #,广西南宁市,2025-02-14,17:36:08, https://nhentaitube.com/
                                                        #,广西南宁市,2025-02-14,17:37:05, https://nhentaihaven.org/
                                                        #,广西南宁市,2025-02-14,17:42:48, https://nhentai.biz/
                                                        文章:uniapp开机自启  发表时间:2025-02-10, 13:17:41  
                                                        展开↯

                                                        #6

                                                        作者:广西南宁市
                                                        用代码触发“点击”事件
                                                        共两步:

                                                        把小图的宽高设为0
                                                        在需要时用代码模拟一下小图的点击事件

                                                        先来看文档中给出的示例代码:
                                                        <template> <div class="demo-image__preview"> <el-image style="width: 100px; height: 100px" :src="url" :zoom-rate="1.2" :preview-src-list="srcList" :initial-index="4" fit="cover" /> </div> </template> <script lang="ts" setup> const url = 'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg' const srcList = [ 'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg', 'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg', 'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg', 'https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg', 'https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg', 'https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg', 'https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg', ] </script> <style scoped> .demo-image__error .image-slot { font-size: 30px; } .demo-image__error .image-slot .el-icon { font-size: 30px; } .demo-image__error .el-image { width: 100%; height: 200px; } </style>
                                                        Run code
                                                        Cut to clipboard


                                                          在依赖环境正确的情况下,复制到合适位置就可以正常使用。

                                                          接下来对它进行修改。

                                                          1.获取引用
                                                          要想模拟点击,前提就是获取dom元素的引用。
                                                          VUE中有三种获取的方式,本文以最简单的document方式举例。
                                                          给元素加个id:
                                                          <el-image id="show-image" style="width: 100px; height: 100px" :src="url" 其他参数略 />
                                                          Run code
                                                          Cut to clipboard

                                                            此时,如果在ts中执行document.getElementById('show-image').click()就可以显示大图了。

                                                            这一步测试成功之后就可以把document.getElementById('show-image').click()绑定到其他事件上,比如某个按钮的点击,这样就实现了“点击按钮显示大图”

                                                            2.设置宽高为0
                                                            因为<el-image-viewer/>和<el-image/>完全就是两个组件,所以小图不会影响大图,直接置0即可:
                                                            <el-image id="show-image" style="width: 100px; height: 100px" :src="url" 其他参数略 />
                                                            Run code
                                                            Cut to clipboard

                                                              此时页面上就不会再显示它了,而触发事件仍然能正常显示大图。

                                                              3.改变大图
                                                              目前的大图url是写死的,如果想让图片变化就得把url数组传进来。
                                                              这里补充一个基本知识:

                                                              在vue中,如果只用let定义变量,而且页面使用了这个变量,当组件渲染完成后,再去改变let变量的值,组件中不会跟着变化。如果想让组件能变化,必须使用ref定义引用变量。

                                                              也就是:
                                                              let srcList = ref([ 'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg', 'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg', 'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg', 'https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg', 'https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg', 'https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg', 'https://fuss10.elemecdn.com/2/11/6535bcfb26e4c79b48ddde44f4b6fjpeg.jpeg', ])
                                                              Run code
                                                              Cut to clipboard

                                                                如果后续想让url变化,需要用srcList.value = 来改变变量的值。

                                                                类似这样(用mitt实现,也可以用其他方式实现,只要能调用到这两行代码即可):
                                                                // 当其他组件弹射时,先修改url的值,再模拟点击一下图片 bus.on("showImg", ({ data: data }) => { srcList.value = data; document.getElementById('show-image').click() })
                                                                Run code
                                                                Cut to clipboard

                                                                  这样就实现了通过其他的事件触发<el-image-viewer/>大图的效果。
                                                                  文章:vue3 element-plus 实现图片预览  发表时间:2025-02-14, 10:50:19  
                                                                  展开↯

                                                                  #7

                                                                  作者:广西
                                                                  文章:uniapp开机自启  发表时间:2025-01-06, 10:04:37  
                                                                  展开↯

                                                                  #8

                                                                  作者:广西南宁市
                                                                  #,广西南宁市,2024-11-11,14:59:29,
                                                                  #,广西南宁市,2024-11-12,03:47:35, FitnessRooms Hot teens get fucked with big cock in gym threesome
                                                                  https://www.pornhub.com/view_video.php?viewkey=ph584957aabad9b
                                                                  http://www.superteensextube.com/
                                                                  http://5prn.ru/track/teen7/Teen+sucking+off+cocks?IN_KEY=Teen+sucking+off+cocks
                                                                  https://teen-sex.me/
                                                                  https://hdhole.com/gym-videos
                                                                  https://www.cumhall.com/vids/stepsister/668.html
                                                                  https://wowteenporn.com/video/56964
                                                                  https://sexnporntube.com/category/incest-family-porn/
                                                                  https://www.gradeuptube.com/tube/teen
                                                                  https://losttube.com/category/teen-porn/
                                                                  https://wowteenporn.com/video/56964
                                                                  https://www.xvideos.com/embedframe/pcfefv5d7f
                                                                  https://www.sexteenageporn.com/category/younger-1.htm
                                                                  https://www.sexteenageporn.com/?vs=c2V4dGVlbmFnZXBvcm4uY29tfA==
                                                                  https://sexzeal.cc/video163627/
                                                                  https://teenx.tv/channel/pussy/1
                                                                  https://www.teenvirginporn.com/
                                                                  #,广西南宁市,2024-12-21,04:42:53, https://xiunice.com/ai-girl-unrealgirls重口作品集-part-6-42p-4k
                                                                  #,广西南宁市,2024-12-21,04:44:13, https://www.jvid.com/lena1231/all
                                                                  #,广西,2025-01-06,09:41:41,

                                                                  花井美理
                                                                  https://x.com/mirihanai/status/1867535066198683901
                                                                  BEMA-002
                                                                  #,广西,2025-01-06,09:55:37, p站x站啥的一般不能倒吧。。。不过澳门杜博那种确实不稳定,但是三个阿拉伯数字+俩重复字母+.com啥的,三次左右就能找到一个类似的
                                                                  #,广西,2025-01-06,10:03:53, RCTD-526
                                                                  工藤拉拉
                                                                  装人偶看过一个叫青井草莓的
                                                                  文章:uniapp开机自启  发表时间:2024-11-11, 14:58:59  
                                                                  展开↯

                                                                  #9

                                                                  作者:广西南宁市
                                                                  build参数配置打包配置
                                                                  "build": { "productName":"xxxx",//项目名 这也是生成的exe文件的前缀名 "appId": "com.leon.xxxxx",//包名 "copyright":"xxxx",//版权 信息 "directories": { // 输出文件夹 "output": "build" }, "nsis": { "oneClick": false, // 是否一键安装 "allowElevation": true, // 允许请求提升。 如果为false,则用户必须使用提升的权限重新启动安装程序。 "allowToChangeInstallationDirectory": true, // 允许修改安装目录 "installerIcon": "./install.ico",// 安装图标 "uninstallerIcon": "./uninstall.ico",//卸载图标 "installerHeaderIcon": "./installheader.ico", // 安装时头部图标 "createDesktopShortcut": true, // 创建桌面图标 "createStartMenuShortcut": true,// 创建开始菜单图标 "shortcutName": "xxxx", // 图标名称 "include": "build/script/installer.nsh", // 包含的自定义nsis脚本 }, "publish": [ { "provider": "generic", // 服务器提供商 也可以是GitHub等等 "url": "http://xxxxx/" // 服务器地址 } ], "files": [ // 携带文件路径 "dist/electron/**/*" ], "dmg": { //mac系统dmg包配置 "contents": [ { "x": 410, "y": 150, "type": "link", "path": "/Applications" }, { "x": 130, "y": 150, "type": "file" } ] }, "mac": { //mac系统包配置 "icon": "build/icons/icon.icns" }, "win": { //window系统包配置 "icon": "build/icons/aims.ico", "target": [ { "target": "nsis", "arch": [ "ia32" ] } ] }, "linux": { //linux系统包配置 "icon": "build/icons" } }
                                                                  Run code
                                                                  Cut to clipboard
                                                                    文章:Electron在windows下打linux包  发表时间:2024-12-13, 03:35:58  
                                                                    展开↯

                                                                    #10

                                                                    作者:广西南宁市
                                                                    squashfs for windows:windows下的squ打包工具

                                                                    最近项目需要实现在Windows上进行文件打包,熟悉squashfs文件系统的都知道,是为Linux打造的文件系统,在Linux上也有相应的工具,安装后用命令即可实现打包。

                                                                    那么,Windows下如何呢?经过查找资源,发现大神做出了Windows下的exe文件。具体文件放在文末链接处。用法如下

                                                                    1 将文件解压到Windows可执行目录下
                                                                    2 通过win+R,然后cmd进入解压的当前目录
                                                                    3 执行
                                                                    mksquashfs.exe 文件1 ...... 目标文件目录进行打包
                                                                    unsquashfs.exe 目标文件进行解包

                                                                    4 其余命令参数参考执行程序的提示或Linux下相关参数

                                                                    sqfs_for_win.zip
                                                                    文章:Electron在windows下打linux包  发表时间:2024-12-13, 03:34:36  
                                                                    展开↯

                                                                    #11

                                                                    作者:广西
                                                                    自动随机壁纸
                                                                    自动壁纸.rar
                                                                    #,广西,2024-12-11,21:19:05, 李振球的私人网盘 Setup 0.2.9.exe
                                                                    #,广西南宁市,2024-12-13,02:12:51, 合规监测系统-8.3.229.AppImage
                                                                    #,广西南宁市,2024-12-13,02:49:38, htafxt_8.3.229_amd64.deb
                                                                    文章:Go编译exe程序指定图标  发表时间:2024-12-11, 20:14:00  
                                                                    展开↯

                                                                    #12

                                                                    作者:广西
                                                                    Go语言编译exe生成图标

                                                                    操作前提:安装 MinGW
                                                                    下载地址:点击这里转到下载地址

                                                                    在 main.go 的同级目录下 新建文件 main.rc ,文件内容如下
                                                                    IDI_ICON1 ICON "ICON.ico"
                                                                    Run code
                                                                    Cut to clipboard


                                                                      在 main.rc 的同级目录下 放置一个 ICON.ico 的图标文件
                                                                      按住 Shift 右键当前目录,打开命令提示符,输入如下指令回车
                                                                      windres -o main.syso main.rc
                                                                      Run code
                                                                      Cut to clipboard

                                                                        命令结束后会生成一个 main.syso 文件

                                                                        最后一步,在命令输入如下指令回车,就编译好了有图标的exe可执行程序
                                                                        go build -ldflags="-H windowsgui -w -s"
                                                                        Run code
                                                                        Cut to clipboard

                                                                          文章:Go编译exe程序指定图标  发表时间:2024-12-11, 20:12:06  
                                                                          展开↯

                                                                          #13

                                                                          作者:广西
                                                                          随机壁纸开发免费api
                                                                          https://picsum.photos/
                                                                          https://www.cnblogs.com/cxfs/p/16550880.html
                                                                          https://bing.img.run/api.html
                                                                          https://blog.ltyuanfang.cn/241.html
                                                                          文章:Go编译exe程序指定图标  发表时间:2024-12-11, 20:10:33  
                                                                          展开↯

                                                                          #14

                                                                          作者:广西
                                                                          golang设置图标

                                                                          一、准备图标文件
                                                                          在设置应用程序图标前,我们需要准备一个.ico格式的图标文件。如果你没有现成的图标文件,可以使用在线工具或者图标编辑软件来创建一个.ico格式的图标文件。可以考虑使用以下在线工具:
                                                                          https://iconverticons.com/online/
                                                                          https://favicon.io/favicon-converter/
                                                                          这里我选择使用iconverticons创建一个名为“myapp.ico”的图标文件。

                                                                          二、使用rsrc工具
                                                                          rsrc是一个在Windows平台下打包资源文件的工具。在Golang中设置应用程序图标,我们需要使用rsrc工具来将我们的图标文件打包成资源文件。rsrc工具可以通过以下链接下载:
                                                                          https://github.com/akavel/rsrc/releases
                                                                          下载后,将rsrc.exe文件放到一个路径下,以后我们将在这个路径下进行操作。

                                                                          三、创建main.go文件
                                                                          在完成rsrc工具的准备之后,我们需要创建一个Go文件来使用打包后的图标文件。在本文中,我们将使用“myapp.ico”文件作为应用程序的图标。以下是我们的代码示例:
                                                                          package main import "github.com/visualfc/rsrc/rsrc" func main() { rsrc.Init() }
                                                                          Run code
                                                                          Cut to clipboard

                                                                            以上代码中,我们引入了rsrc包,并使用rsrc.Init()函数初始化rsrc工具。

                                                                            四、使用rsrc工具打包资源文件
                                                                            在完成main.go文件的创建之后,我们需要使用rsrc工具将图标文件打包成资源文件。在命令行中切换到我们之前放置rsrc.exe的路径下,执行以下命令:
                                                                            rsrc.exe -ico myapp.ico -o rsrc.syso -arch amd64
                                                                            Run code
                                                                            Cut to clipboard


                                                                              以上命令的意思是将“myapp.ico”图标文件打包成名为“rsrc.syso”的资源文件,架构为amd64。执行成功之后,我们可以看到当前目录下多了一个名为“rsrc.syso”的文件。这个文件就是我们打包好的资源文件。

                                                                              五、使用打包后的资源文件
                                                                              在完成前面的操作后,我们现在可以开始使用打包后的资源文件了。我们需要在main.go文件中指定应用程序的图标文件。以下是我们修改后的代码示例:
                                                                              package main import ( "github.com/visualfc/rsrc/rsrc" "syscall" ) var ( kernel32 = syscall.NewLazyDLL("kernel32.dll") procSetConsoleIcon = kernel32.NewProc("SetConsoleIcon") ) func main() { rsrc.Init() setIcon("myapp.ico") } func setIcon(iconFilePath string) { hIcon, err := syscall.LoadIcon(0, syscall.MAKEINTRESOURCE(1)) if err != nil { panic(err) } err = procSetConsoleIcon.Find() if err == nil { syscall.SetLastError(procSetConsoleIcon.Call(uintptr(hIcon))) return } var hwnd uintptr syscall.NewLazyDLL("user32.dll").NewProc("GetForegroundWindow").Call(uintptr(unsafe.Pointer(&hwnd))) if hwnd == 0 { syscall.NewLazyDLL("user32.dll").NewProc("GetDesktopWindow").Call(uintptr(unsafe.Pointer(&hwnd))) } syscall.NewLazyDLL("user32.dll").NewProc("SendMessageW").Call(hwnd, 0x80 /*WM_SETICON*/, 1 /*ICON_SMALL*/, uintptr(hIcon)) }
                                                                              Run code
                                                                              Cut to clipboard


                                                                                以上代码中,我们引入了syscall包,并使用LoadIcon函数加载指定的.ico格式图标文件。在代码中,我们还定义了一个名为“setIcon”的函数,用于设置应用程序的图标。在main函数中,我们调用“setIcon”函数来设置我们的应用程序图标。

                                                                                运行程序后,我们会发现应用程序的图标已经成功地更改了。
                                                                                文章:Go编译exe程序指定图标  发表时间:2024-12-11, 20:08:00  
                                                                                展开↯

                                                                                #15

                                                                                作者:广西
                                                                                GO语言生成exe加图标

                                                                                第一步需要下载一个第三方库
                                                                                go get github.com/akavel/rsrc
                                                                                Run code
                                                                                Cut to clipboard

                                                                                  下载完成之后来到你设置GOPATH环境变量的目录
                                                                                  环境变量\src\github.com\akavel\rsrc 然后编译一下rsrc.go编译成exe可执行文件

                                                                                  拷贝rsrc.exe到你的GOPATH目录
                                                                                  创建manifest文件, 命名:main.exe.manifest
                                                                                  <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" processorArchitecture="x86" name="controls" type="win32" ></assemblyIdentity> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" ></assemblyIdentity> </dependentAssembly> </dependency> </assembly>
                                                                                  Run code
                                                                                  Cut to clipboard

                                                                                    rsrc.exe -manifest main.exe.manifest -ico 图标的名字.ico -o main.syso
                                                                                    Run code
                                                                                    Cut to clipboard

                                                                                      go build -o main.exe
                                                                                      Run code
                                                                                      Cut to clipboard


                                                                                        CMD运行这俩条命令就可以了
                                                                                        文章:Go编译exe程序指定图标  发表时间:2024-12-11, 20:02:51  
                                                                                        展开↯

                                                                                        #16

                                                                                        作者:广西
                                                                                        将.go文件编译成exe
                                                                                        go build -o tms_server_by_xh.exe https_server.go
                                                                                        Run code
                                                                                        Cut to clipboard

                                                                                          tms_server_by_xh.exe 是生成的exe文件名,https_server.go是脚本

                                                                                          go build -ldflags="-H windowsgui" -o 随机壁纸.exe
                                                                                          Run code
                                                                                          Cut to clipboard
                                                                                            展开↯

                                                                                            #17

                                                                                            作者:广西南宁市
                                                                                            在vue中用百度地图标记某些地点信息,并提示
                                                                                            应用插件: vue-baidu-map
                                                                                            功能效果

                                                                                            1.安装vue-baidu-map插件。
                                                                                            2.在main.js中添加代码
                                                                                            import BaiduMap from 'vue-baidu-map' Vue.use(BaiduMap, { // ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */ ak: 'udc6OrhXR4BVrdjvVlSxyU2D3Mmd7Y' })
                                                                                            Run code
                                                                                            Cut to clipboard


                                                                                              3.vue页面
                                                                                              <template> <div> <baidu-map ak="ocjtpCpd3HusX9VUmkfc49P9jxRV5Vch" :scroll-wheel-zoom="true" :center="{ lng: 116.383141, lat: 39.913607 }" :zoom="12" > <!-- :scroll-wheel-zoom="true" //开启滚轮缩放 --> <!--地图视图--> <bm-view class="map"></bm-view> <!--点标注--> <!-- position 标注的位置 --> <!-- dragging 是否启用拖拽 --> <!-- title 鼠标移到marker上显示内容 --> <!-- zIndex设置覆盖物的zIndex --> <!-- icon标注所用的图标对象 --> <!-- dragend 拖拽结束时触发此事件 --> <div v-for="(marker, index) of markers" :key="index"> <bm-marker :position="{ lng: marker.lng, lat: marker.lat }" @mouseover="lookDetail(marker)" @mouseout="infoWindowClose(marker)" :icon="{ url: markerIcon, size: { width: 34, height: 34 } }" :dragging="true" :zIndex="999999999" > <!-- show 是否开启窗体 --> <!-- close窗体被关闭时触发的事件 --> <!-- open窗体被打开时触发的事件 --> <bm-label :content="marker.number" :labelStyle="{ color: 'red', fontSize: '24px' }" :offset="{ width: -35, height: 30 }" /> <bm-info-window :position="{ lng: marker.lng, lat: marker.lat }" :show="marker.showFlag" @close="infoWindowClose(marker)" > <div>电站名称:111</div> <div style="display: flex; flex-wrap: wrap; width: 250px"> <div>充电金额:{{ marker.buildName }}</div> <div>充电金额:{{ marker.buildName }}</div> <div>充电金额:{{ marker.buildName }}</div> <div>充电金额:{{ marker.buildName }}</div> <div>充电金额:{{ marker.buildName }}</div> </div> </bm-info-window> </bm-marker> </div> <!--比例尺控件--> <bm-scale anchor="BMAP_ANCHOR_TOP_RIGHT"></bm-scale> <!--缩放控件--> <bm-navigation anchor="BMAP_ANCHOR_BOTTOM_RIGHT"></bm-navigation> </baidu-map> </div> </template>   <script> import BmView from 'vue-baidu-map/components/map/MapView' //地图视图 import BmMarker from 'vue-baidu-map/components/overlays/Marker' //点标注 import BmInfoWindow from 'vue-baidu-map/components/overlays/InfoWindow' //标注弹窗 import BmScale from 'vue-baidu-map/components/controls/Scale' import BmNavigation from 'vue-baidu-map/components/controls/Navigation' export default { components: { BmView, BmMarker, BmInfoWindow, BmScale, BmNavigation, }, data() { return { // 地图标记点 markers: [ { lng: '116.383141', lat: '39.913607', name: '信息窗口1', showFlag: false, number: '1', buildName: '胡歌', }, { lng: '116.383141', lat: '39.900000', name: '信息窗口2', showFlag: false, number: '20', buildName: '花花', }, ], markerIcon: 'http://api0.map.bdimg.com/images/marker_red_sprite.png', //标注图片 } }, methods: { infoWindowClose(marker) { //弹框关闭 marker.showFlag = false }, lookDetail(marker) { marker.showFlag = true }, }, } </script> <style lang="less" scoped> .map { width: 100%; height: 500px; } </style>
                                                                                              Run code
                                                                                              Cut to clipboard


                                                                                                文章:vue项目百度地图如何自定义标注marker  发表时间:2024-12-01, 16:26:07  
                                                                                                展开↯

                                                                                                #18

                                                                                                作者:广西南宁市
                                                                                                文章:CSS实现流动边框特效  发表时间:2024-11-13, 01:53:26  
                                                                                                展开↯

                                                                                                #19

                                                                                                作者:广西南宁市
                                                                                                css背景动态渐变效果
                                                                                                <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>丰富彩色动态渐变背景与发光文字</title> <style> body { margin: 0; height: 100vh; display: flex; justify-content: center; align-items: center; font-family: Arial, sans-serif; text-align: center; /* 丰富彩色渐变背景 */ background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet, red); /* 覆盖整个背景 */ background-size: 400% 400%; /* 动画设置 */ animation: gradient 30s ease infinite; } @keyframes gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } h1 { /* 黑色文字 */ color: black; /* 文字发光效果 */ text-shadow: 0 0 10px white, 0 0 20px white, 0 0 30px white, 0 0 40px white; /* 增加文字的可读性,可选 */ font-weight: bold; font-size: 3em; /* 根据需要调整文字大小 */ } </style> </head> <body> <h1>丰富彩色动态渐变背景与发光文字效果</h1> </body> </html>
                                                                                                Run code
                                                                                                Cut to clipboard
                                                                                                  文章:CSS实现流动边框特效  发表时间:2024-11-12, 02:59:39  
                                                                                                  展开↯
                                                                                                  你好,残忍屏蔽广告

                                                                                                  确定要清除编辑框内容吗?

                                                                                                  该删除操作将不可恢复。

                                                                                                  删除 取消

                                                                                                  激活Windows

                                                                                                  转到"设置"以激活Windows。