自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(102)
  • 收藏
  • 关注

原创 C# 程序隐藏在托盘,快捷方式启动Show出来。

1、第一种情况: 最小化+托盘 public App() { this.Startup += App_Startup; } private void App_Startup(object sender, StartupEventArgs e) { bool ret; mutex = new System.Threading.Mutex(true, "RsVPN", ou

2020-12-08 17:04:57 858 1

原创 C# 通过代码增删系统路由表 3000多条不到1s

具体方式参考 http://blog.chdz1.com/NETjs/253.html 本地运行有异常 进行了小改动 具体可参考如下using System;using System.Collections.Generic;using System.Linq;using System.Net;using System.Text;namespace RSpeedo.Controller.Service{ class IPForwardRow { ...

2020-06-19 17:09:11 448 1

原创 QT5中,WM_COPYDATA消息丢失处理

之前利用nativeEvent 截获来着系统的消息。发现有 WM_COPYDATA 消息接收不到的问题。(在操作下拉框之后,多么奇怪的bug),后来查找资料,有人说 数据处理太多,处理不及时,导致截获消息失败win32 WM_COPYDATA 消息结构体typedef struct tagCOPYDATASTRUCT { ULONG_PTR dwData; //用户...

2020-04-28 10:45:38 705 1

原创 phantomjs使用(创作助手)

PhantomJS是一个基于WebKit的无头浏览器(headless browser),它可以用来模拟用户在网页上的行为,比如点击、输入、滚动、截图等等。PhantomJS可以通过命令行来使用,也可以通过JavaScript脚本来操作。命令,可以进入PhantomJS的交互模式,可以在交互模式下执行JavaScript代码。总之,PhantomJS是一个非常有用的工具,可以用来自动化测试、网页截图、网页抓取等等。命令,可以执行指定的JavaScript脚本(例如hello.js文件)。

2023-12-06 16:26:27 187

原创 解释 RESTful API,以及如何使用它构建 web 应用程序(来自AI)

要使用 RESTful API 构建 web 应用程序,需要设计 API 的资源和操作,并为这些资源和操作定义 URL、HTTP 方法和响应状态码。RESTful API 倡导使用 HTTP 的 GET、POST、PUT、DELETE 等方法来对资源进行 CRUD(增删改查)操作,以及使用 HTTP 响应状态码来表示操作结果。同时,使用 RESTful API 还需要注意安全性和性能等方面的问题,如防止 CSRF 攻击、使用 HTTPS 协议来保护数据传输、为 API 设计合适的缓存策略等。

2023-12-06 16:23:39 157

原创 阿里云主机批量修改主机密码

阿里云主机批量修改主机密码

2022-09-19 18:05:36 236 1

原创 vue不是内部或外部命令,也不是可运行的程序

vue

2022-07-13 09:26:28 258

原创 headers Authorization

var auth = `${host.user}:${host.pass}` const buf = Buffer.from(auth, 'ascii'); strauth = buf.toString('base64'); console.info(buf.toString('base64')); rejectUnauthorized: false, headers: { '...

2022-05-18 10:33:19 818

转载 WebBrowser

WebBrowser(IE) 与 JS 相互调用 - 幕三少 - 博客园

2021-10-26 17:57:48 111

原创 c# 计算当前时间时间戳 生成随机数

public static string GetRandOnlyId(string timeStamp ) { //var timeStamp = (DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000;// 减少时间戳位数形成新的短时间戳 var beginRand = IntToi64(new Random(GetRandomSeed()).Next(..

2021-10-21 10:06:56 997

原创 WPF MouseLeftButtonDown自动触发

StackPanel main_tab = WanhopViewController.CurrentHomeWindow.FindName("tab_main") as StackPanel; MouseButtonEventArgs args = new MouseButtonEventArgs(Mouse.PrimaryDevice, 0, MouseButton.Left); WanhopViewController.CurrentH...

2021-10-21 10:06:25 450 1

原创 c# image 转 Base64 post 请求 “+” 消失(转 空格)问题

//图片转base64public static String ImageFile2Base64(String imageFile) { Image image = Image.FromFile(imageFile); MemoryStream ms = new MemoryStream(); image.Save(ms, image.RawFormat); byte[] byteArra..

2021-10-19 17:20:58 469

原创 Windows系统_ARM处理器无法打开客户端问题解决

问题现象:客户端无法打开用户环境:Windows系统 ARM处理器问题定位:兼容性问题解决方法:右键客户端,点击“属性” 选择“兼容性”,点击“更改所有用户的设置”选择“更改仿真设置”勾选设置如下:结论:设置成功后,再次尝试打开客户端,可正常打开使用。...

2021-09-01 09:26:32 2050

原创 Prometheus环境配置

1、环境准备服务器IP是202.101.58.162,登入,建立相应文件夹2、安装Prometheus Server安装docker准备应用https://prometheus.io/download/或者 git clone https://github.com/prometheus/client_golang.git//wgethttps://github.com/prometheus/prometheus/releases/downlo...

2021-08-03 10:18:54 149

原创 OPV 客户端分流配置

clientdev tun # 路由模式# 改为tcpproto tcp# OpenVPN服务器的外网IP和端口remote 202.101.58.162 1194;route 0.0.0.0 0.0.0.0 vpn_gateway;route 192.168.0.0 255.255.0.0 net_gateway;route 85.14.249.110 255.255.255.255 net_gatewayallow-pull-fqdnroute ip138.com 255...

2021-03-12 11:47:17 1363 1

原创 wpf WebBrowser 默认滚动条样式修改

WebBrowser 默认采用的是IE 内核。所以 进度条样式无法做美化。以下策略: 修改为与背景颜色一致,WebBrowser 加载默认获取焦点,鼠标滚轮触发滚动事件。 string head = "<html}><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">" + "<style>" .

2021-03-11 16:07:15 378

原创 c# 正则密码强度

1、包含数字及字母System.Text.RegularExpressions.Regex.IsMatch(newpwd.ToString().Trim(), @"^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,24}$")2、包含数字、字母、特殊字符System.Text.RegularExpressions.Regex.IsMatch(newpwd.ToString().Trim(), @"^(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^

2021-03-11 15:56:03 448

原创 Web 文件下载方式

1、window.open(downloadUrl);2、 // 获取XMLHttpRequest var xmlResquest = new XMLHttpRequest(); // 发起请求 xmlResquest.open('GET', downloadUrl, true); // 设置请求头类型 xmlResquest.se

2021-03-11 15:40:53 469

原创 wpf 滚动条样式

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:RsVPN"> <!-- ScrollViewer 滚动条 --&.

2020-12-23 15:14:36 837 1

原创 WPF 资源动态加载

LoadStyleResource(@"Resources/style/ResourceDictionary.xaml");窗体动态加载样式 private void Window_Initialized(object sender, EventArgs e) { this.AllowsTransparency = true; this.Style = (Style)this.FindResourc...

2020-12-11 15:21:06 472

原创 c# 开机自启 加载配置文件失败-路径

1、问题:正常情况下 快捷方式打开 软件 ,加载配置文件正常。设置开机自启后加载文件配置文件失败。2、解决方法:修改访问文件路径 String appStartupPath = System.IO.Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName); FileStream fs = File.Open(appStartupPath + @"\lang.cfg", FileMode..

2020-12-11 15:14:42 616

原创 nsis 多语言的使用

一 载入默认的界面文本和语言属性 NSIS有两种引入多语言的方法,其中:使用缺省模式,引入代码如下LoadLanguageFile "${NSISDIR}\Contrib\Language files\Czech.nlf"LoadLanguageFile "${NSISDIR}\Contrib\Language files\Dutch.nlf"LoadLanguageFile "${NSISDIR}\Contrib\Language files\French.nlf"LoadLan...

2020-11-25 15:15:01 1292 1

原创 DES加解密

using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Security.Cryptography;using System.Text;namespace RsVPN{ class DesCryption { /// <summary> /// DES解密字符串 /// </sum.

2020-11-20 16:41:39 113

原创 c# 操作ini 文件

using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Runtime.InteropServices;using System.Text;namespace RsVPN{ public class OperateIniFile { private static String filePath = ""; #reg.

2020-11-20 15:40:18 119

原创 layui tag

layui.config({ base: '/static/js/modules/' //假设这是你存放拓展模块的根目录 }).extend({ //设定模块别名 tag: 'tag' //如果 tag.js 是在根目录,也可以不用设定别名 }).use('tag', function () { tag = layui.tag; //全局设置 ...

2020-11-17 16:37:28 768

原创 layui 拦截button跳转刷新页面

form.on('submit(form)', function (data) { return false; });

2020-11-11 16:57:48 717

原创 JS 监听滚动条事件

$(".layui-code-ol").scroll(function () { viewH = $(".layui-code-ol").height(),//可见高度 contentH = $(".layui-code-ol").get(0).scrollHeight,//内容高度 scrollTop = $(".layui-code-ol").scrollTop();//滚动高度 //判断执行事件})置底$(".layui-code-ol").scrollTop($(.

2020-11-11 16:56:45 1061

原创 JS 非四舍五入保留小数点相应位数

toFixed(num,decimal) { num = num.toString(); let index = num.indexOf('.'); if (index !== -1) { num = num.substring(0, decimal + index + 1) } else { num = num.substring(0) } return parseFloat(num).toFixed(decimal)}let num = 89.369;console.log(.

2020-11-11 16:56:22 251

原创 vue + node.js 前后端部署在同一服务器上

2020-11-10 10:50:59 627

原创 修改电脑主机名 c#

public static void SetComputerName() { RegistryKey pregkey; pregkey = Registry.LocalMachine.OpenSubKey("SYSTEM\\ControlSet001\\Control\\ComputerName\\ComputerName", true); pregkey.SetValue("ComputerName"...

2020-11-09 15:47:51 354

原创 layui 代码修饰器

<pre class="layui-code" id="logfile" lay-height="360px" lay-title="forward-log" lay-skin="notepad" lay-about="false">日志区域</pre>参数 类型 描述 elem string 指定元素的选择器 title string 设定标题 height string 设置最大高度 encode bo..

2020-11-09 11:12:16 127

原创 文本框输入监听及匹配搜索事件

$('#***').on('input',function(){ console.log($('#***').val()); }); $('#***').keyup(function(){ var keyWord = $('#***').val(); if ( keyWord.length>0){ $('.layui-code-ol li').hide().filt...

2020-11-04 11:11:46 300

原创 layui.table laypage 服务端请求分页 并排序

//分页请求数据function pagingData(alarmtotal, alarmArray) { laypage.render({ elem: 'tablelaypage' , limit: limit , limits: [10, 50, 100, 200, 300, 500, 1000] , count: alarmtotal , layout: ['count', 'prev', 'page', 'ne.

2020-10-30 15:19:18 729

原创 laydate使用详解

laydate.render({ elem: '#test' ,type: 'year' //年选择器,month年月选择器,date年月日选择器,time时间选择器,datetime日期时间选择器 ,range: true //或 range: '~' 来自定义分割字符 开启左右面板选择范围 ,value: getNowTime(new Date(), true) + " ~ " + getNowTime(new Date(), false) // '2018-08-18' //必须.

2020-10-30 14:36:46 12982

原创 alertmanager配置邮件报警

global: #resolve_timeout: 5m smtp_smarthost: 'smtp.raisecom.com:25' smtp_from: '***@raisecom.com' smtp_auth_username: '***@raisecom.com' smtp_auth_password: 'raisecom@123' smtp_require_tls: falsetemplates: - '/alertmanager/email.tmpl' ro.

2020-09-16 09:58:03 1205

原创 非脚手架搭建自己的vue

1、创建项目文件夹xxx2、cd到xxx下: cmd 回车3、xxx下运行 npm init 回车 最终生成 package.json4、你怕吗install --save dev webpack5、新建 文件夹src 下新建App.vue main.js index.html components文件夹6、根目录西安新建 webpack.config.js7、安装依赖报 npm install --save XXX > npm...

2020-08-28 15:05:40 402

原创 qt 窗口带阴影

QFrame *frame = new QFrame(this); ui.setupUi(this); frame->setStyleSheet("QFrame{background-color: rgb(229, 229, 229);border-radius:5px}"); //设置圆角与背景透明 frame->setGeometry(5, 5, t...

2020-08-26 16:37:37 202

原创 layui select 动态创建、鼠标事件

functionqurbiztemplate(data){vardescription="相关信息..."biztemplateArray.forEach(element=>{if(element._id==data){console.log(element.rig...

2020-08-26 16:26:13 570

原创 WPF 碎记

1、跨窗体访问控件/// &lt;summary&gt; /// 添加设备 /// &lt;/summary&gt; /// &lt;param name="sender"&gt;&lt;/param&gt; /// &lt;param name="e"&gt;&lt;/param&gt;

2020-08-26 16:24:17 87

原创 自定义控件之仪表盘gauge

gauge.xaml&lt;UserControl x:Class="WpfApplication5.gauge" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xam...

2020-08-26 16:23:01 763

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除