WaterMoon

  • technology
  • essay
  • English
    • 简体中文
technology

windows office激活 vlmcsd搭建

本文主要讲解windows和office通过kms激活 以及vlmcsd服务器搭建,激活原理是待激活设备每隔一个周期与模拟kms服务器vlmcsd通信 ,从而获得授权,所以如果是极端状态无法联网的设备,可能到一个周期后是无法保持激活状态的,这点得注意,如果用虚拟机充当服务器的话,激活周期快到的时候,重新打开虚拟机,手动激活续时间即可! 1. vlmcsd服务端 vlmcsd是个小应用程序,可以放在docker,实体机,以及虚拟机里面,只要能用来当服务器的设备都可以。 因为笔者拥有多台设备需要激活,所以放在装有ubuntu的云服务器里,随时可用。 进入https://github.com/Wind4/vlmcsd/releases下载最新版源码,当然你也可以用wget。 编译起来颇为简单,只需要gcc和make,我并没有安装其他依赖。 复制服务内容进去,不需要改 然后: 2.客户端 去msdn itellyou 下载正版镜像安装 序列码可进入https://github.com/ActiveIce/vlmcsd中查看。 启动 Windows Powershell (管理员运行) 并输入下列命令: 激活 windows 激活 Office 返回sucess即可,去软件界面查看license。 激活常见错误返回值 1 ERROR CODE: 0xC004F069ERROR DESCRIPTION: The Software Licensing Service reported that the product SKU is not found. 笔者安装的是office 2019 pro plus,查了一下是因为装的office零售版,需要转换为批量版,新建一个xx.bat文件 其他版本的转换bat 自行搜索,大同小异,当然如果不是默认安装,目录也是需要你修改的 然后复制进去: 右键用管理员运行不报错即可,之后再运行之前的命令。 2 ERROR CODE: 0xC004F017ERROR DESCRIPTION: The Software Licensing Service reported that the license is not installed. 哪个注册码报错就卸载哪个

2022-10-22 0Comments 1032Browse 2Like 水月大侠 Read more
technology

使用qBreakpad跟踪程序异常退出

qBreakpad 介绍 qBreakpad is Qt library to use google-breakpad crash reporting facilities (and using it conviniently). Supports Windows (but crash dump decoding will not work with MinGW compiler) Linux MacOS X qBreakpad 如何使用: 下载代码 静态编译qBreakpad 用qtcreator打开qBreakpad目录的qBreakpad.pro文件,根据需求编译debug版本或者release版本,一般都是需要debug版本。编译完成后,检查以下文件是否存: 把qBreadpad集成到本地工程 修改本地工程的pro文件,如下(根据实际情况修改) 修改本地工程的main.cpp,也可以在别处。 如何分析dmp文件: 生成symbols 该命令可能出错 此为系统未注册 msdia*.dll 文件。从 Visual Studio 的安装目录中可以搜索到,在目录 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ 下存在 msdia120.dll 和 msdia140.dll 文件。注册一下 msdia140.dll 即可。 按下windows键,输入cmd,鼠标右键点击 命令提示符 以管理员方式运行,然后执行如下命令注册 msdia140.dll: 创建对应的目录 看到dump文件信息 输出 创建目录并移动文件 注意如果动态库也需要调试,那么按照此步骤创建库的sym并放到对应的目录。 查看dmp文件 minidump_stackwalk.exe可以从安卓开发工具获取到。

2021-11-05 0Comments 1300Browse 1Like 勇往直前 Read more
technology

FFT一种C代码实现

2021-08-20 0Comments 911Browse 1Like 勇往直前 Read more
technology

Tiff图像直方图均衡化以及规定化算法

1.图像的截取 tiff格式图片大多为16位数的灰度片,往往色阶比较集中,肉眼难以识别,所以需要图片处理,考虑的方法为,截取集中的像素值段映射为8位图片后再处理,映射不应只考虑线性函数,可以根据具体图像加入γ因子,之后再考虑Tiff图像直方图均衡化以及规定化算法,这里不再赘述(使用的UI和库为opencv+qt)。 以下为部分示例代码: 2.直方图的均衡化 (1)数学原理 ​ 将图片的色阶图可以看成概率密度函数,由于原图分布不均匀,会导致对比度变差,那么如果让像素值在区域内均匀分布,那么识别度将会极大提高。根据概率论的定理: 设随机变量X具有概率密度函数$f_x(x),-\infty<x<\infty$, 又设函数$g(x)$处处可导且恒有$g'(x)>0$(或且恒有$g'(x)<0$),则$Y=g(X)$是连续型随机变量,其概率密度为:$$f_y(y)={ {f_x[h(y)]|h'(y)|, a<y<b \atop 0,其他} }$$其中$a=min{-\infty<x<+\infty }$​,$ b=max {-\infty<+\infty}$​,$h(y)$​是$g(x)$​的反函数。 这个定理在书上很容易证明!我们现在将像素范围归一化处理,即所有像素位于$[0-1]$的范围中,然后已之知我们的像素直方图为$f_x(x)$和随机变量$X$,$Y=g(X)$是我们想要得到均匀分布的随机变量,那么重点就在于如何求这个映射关系$g(X)$,公式变形可得 :$f_y(y)=f_x(x)|h'(y)|,a<y<b \rightarrow f_y(y)/|h'(y)|=f_x(x)$ 因为$h(y)和g(x)$互为反函数那么根据定理:原函数的导数是反函数导数的倒数 得知$g'(x)=1/h'(y)$,即 $f_y(y) |g'(x)|=f_x(x)$ 对于这个等式对$dx$进行积分可得 $f_y(y)g(x)=\int{f_x(x)dx}$, 因此如果确定$f_y(y)$那么$g(x)$就可以得出等式。由于$f_y(y)$是均匀分布,由概率密度公式已知: $f(x)=1/(b-a),a<X<b$, 我们已经做了归一化处理范围为$(0,1)$,所以$f_y(y)=1$,由此得知 $g(x)=\int{f_x(x)dx}$​​​。 (2)加权均衡化算法 ​ 加权均衡化算法,需要加权矩阵,对每个像素点做加权矩阵范围的均衡化处理,作用是增加局部对比度,原理如下图所示: (3)效果图及示范代码   if(m_histogramPara.balanceHistogram){   equalizeHist(matTmp, matTmp); //全局直方图均衡化,opencv默认的均衡化函数,直接调用   }else{       if(m_histogramPara.localBalanceHistogram){           matTmp=calcLocalBalanceHistogram(matTmp,m_histogramPara.balanceLevel); //此处为加权均衡化函数,即将原始图像后做加权均衡化       }   }   for(int y = 0; y<qimg.height(); y++){ //显示代码,QImage与mat的转换       uchar * line = (uchar *)qimg.scanLine(y);       for(int x = 0; x<qimg.width(); x++){           line[x]=matTmp.at<uchar>(y,x);           //                 matTmp.at<ushort>(y,x)=matTmp.at<ushort>(y,x);       }   }           calcLocalBalanceHistogram(Mat &mat, int balanceLevel) //balanceLevel 均衡化块的大小 { ​   mutex.lock();   float valueCount[256];   float cumulativeDistributionArray[256];//   if(mat.cols<balanceLevel||mat.rows<balanceLevel){       qDebug()<<"photo is too small!";       return Mat();   }   qDebug()<<"photo is custom big!";   int imageRows=mat.rows;   int imageCols=mat.cols;   Mat newMat=mat.clone(); ​   for(int row=balanceLevel/2;row<imageRows-1-balanceLevel/2;row++){ ​       for(int column=balanceLevel/2;column<imageCols-1-balanceLevel/2;column++){           if(column==balanceLevel/2){ ​               Mat tmpMat=mat(Rect(column-balanceLevel/2,row-balanceLevel/2,balanceLevel,balanceLevel));                 qDebug()<<mat.at<ushort>(column-balanceLevel/2,row-balanceLevel/2); ​               calcValueCount(tmpMat,balanceLevel,valueCount);   //算得边角矩阵的像素频率值,这个只能硬算                               }else{ ​               Mat oldColumn=mat.col(column-balanceLevel/2-1);               Mat newColumn=mat.col(column+balanceLevel/2);               for(int i=row-balanceLevel/2;i<row+balanceLevel/2;i++){            …

2021-08-11 2Comments 1359Browse 7Like 水月大侠 Read more
technology

Linux问题 Debian: cannot find -lGL

执行以下命令即可: sudo apt-get install build-essentialsudo apt-get install libgl1-mesa-dev

2021-08-11 0Comments 855Browse 1Like 勇往直前 Read more
technology

C、C++中出现nan另外的原因

除去一般的原因,今天还碰到一个特殊原因。 类中定义了一个double类型的成员变量,没有初始化,直接初始化,有几率这个变量的值为nan。

2021-08-11 0Comments 883Browse 0Like 勇往直前 Read more
technology

Gitbook-editor 下载

 Gitbook-editor 下载 ​        gitbook-editor 内置的markdown编辑器 tab键被chrome内核浏览器阻断了,并不符合大多数人的输入习惯,所以我建议用typora来写文档,电子书和博客,gitbook 用于可视化管理,以及汉化等工具,转pdf等等,或者最基本的,初始化电子书和章节,剩下的都交给typora。 在typora软件中依次点击视图,选择显示文件树,可更直观选择需要修改的文档! 由于gitbook-editor 现已被官方摒弃(官方现在只有在线,但是在墙外),这里提供gitbook-editor下载地址:  https://pan.baidu.com/s/1B-sTtVZCuqwWEw4JAD2g5g 提取码bvf8 typora官网选择下载即可!

2021-08-10 0Comments 971Browse 1Like 水月大侠 Read more
technology

v2ray+apache2+ssl+tls

v2ray+apache2+ssl+tls 伪装流量加密配置: 由于某度搜索对科学文献方面不甚友好,所以为提高工作效率,带给大家以下方法确保安全和健康上网! 1.准备工作: 1.云服务器的选择 当下流行好多家的vps可以选择,大家可以自己去搜适合自己的服务器,由于目的不同还可以选香港机房来降低ping 用于玩外国游戏之类的 这里笔者自己用的是搬瓦工,由于主站被墙,所以提供以下几个国内镜像:bwh81.net/bwh89.net. 2.云服务器的购买以及配置 先注册,一定要输入正确可用邮箱,无论账单还是其他信息,搬瓦工都是用邮箱跟你交流! 进入主页后,按以下指示来购买vps   一般用于google搜索和youtube 看视频 这个台主机配置已经足够了,而且也已经要rmb300左右一年,算上优惠码,如果有钱,想延迟低,可以考虑下面的香港服务器;     输入减免6.58%的优惠码BWH3HYATVBJW,可以便宜一些,如果无效,请自行搜索最新优惠码   然后就是等待,大概10分钟内吧,你会收到已建设好的邮件,邮件里面会包含你的密码,ip和ssh端口! 完成后,回到Client Area,点击my services 点击管理控制面板   如果你习惯于centos的系统 ,接下来的操作可略过就不用看了,直接远程ssh登录即可, 因为笔者更习惯ubuntu,所以首先需要关闭主机,然后安装新系统,我选的20.04,自带bbr加速模块 之后就是putty登录了,输入IP 和port,打开即可,如果你熟悉,可以自行配置字体大小,心跳之类的更方便操作的选项;   3域名的购买和ssl证书的免费获取 由于笔者觉得备案太麻烦,所以选择的是国外域名商https://www.dynadot.com/,具体如何购买域名和下载SSL证书,由于非常简单,不想再赘述,或者等笔者有空再补上,现在请另行搜索 2.apache2的安装和配置 ubuntu安装apache2 apt install apache2 安装成功过后,通过本地浏览器访问 ip即可得到apache2欢迎你的首页   开启apache2 模块用于https a2enmod ssl a2enmod proxy a2enmod proxy_wstunnel a2enmod proxy_http a2enmod rewrite a2enmod headers     其实我不建议改端口,因为http和https的端口默认为80和443,防火墙一般不会封这个两个端口,既然你是伪装流量,那你就不要改. 所以直接修改apache2 配置文件, 首先将https 激活,创建软连到sites-enabled中 cd /etc/apache2/sites-enabled ln -s ../sites-available/default-ssl.conf ./000-default-ssl.conf   然后修改 vi 000-default.conf   <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.example.com ServerName xxblog.com  #以下四条改为你的域名和path ServerAlias www.xxblog.com ServerAdmin xxblog.com DocumentRoot /var/www/html/xxblog # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined RewriteEngine on  #这里的重写,就是把所有的http请求转发为https请求,实现ssl加密 RewriteCond %{HTTPS} !=on RewriteRule ^(.*) https://%{SERVER_NAME}$1 [L,R] # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI…

2021-08-10 2Comments 1445Browse 2Like 水月大侠 Read more
technology

Qt资源文件无效问题

解决Qt资源文件无效问题: 如果Qt的库中有资源文件,并且和应用程序的资源文件同名,在linux下库的资源文件会找不到,windows下则没有问题。 解决方法:把库中的资源文件重新命名。

2021-08-09 2Comments 953Browse 3Like 勇往直前 Read more
essay

Notice

Welcome to te water moon blog! We hope you will have a plasure here! if you are interesting for any of the essay or other words,you can leave a message to me  on the foot! And you can donate to me by the wechart or alypay,this will be motive power to me!

2021-08-09 1Comments 827Browse 1Like 水月大侠 Read more
Newest Hotspots
Newest Hotspots
windows office激活 vlmcsd搭建 使用qBreakpad跟踪程序异常退出 FFT一种C代码实现 Tiff图像直方图均衡化以及规定化算法 Linux问题 Debian: cannot find -lGL

COPYRIGHT © 2021 WaterMoon. ALL RIGHTS RESERVED.