Mac下面压缩是zip的,放Freebsd下面怎么解压呢?
安装unzip的方法是:
-->whereis unzip  查找port源
一般是/usr/ports/archivers/unzip
cd /usr/ports/archivers/unzip
make install clean
rehash    ---在不重启服务器的条件使安装了的命令生效
就可以用unzip命令了 。。
然后通过ftp上传PHPWind_GBK_5[1].3.zip
用unzip PHPWind_GBK_5[1].3.zip
在服务器上解压。。

===> Options unchanged
/!\ WARNING /!\

You have security/openssl installed but do not have
DEFAULT_VERSIONS+=ssl=openssl set in your make.conf

===>  License Info-ZIP accepted by the user
===>   unzip-6.0_8 depends on file: /usr/local/sbin/pkg - found
=> unzip60.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://downloads.sourceforge.net/project/infozip/UnZip%206.x%20%28latest%29/UnZip%206.0/unzip60.tar.gz
===>   Generating temporary packing list
install  -s -m 555 /usr/ports/archivers/unzip/work/unzip60/unzip  /usr/ports/archivers/unzip/work/stage/usr/local/bin
cd /usr/ports/archivers/unzip/work/unzip60 &&  install  -s -m 555 funzip unzipsfx /usr/ports/archivers/unzip/work/stage/usr/local/bin
/bin/ln -sf unzip /usr/ports/archivers/unzip/work/stage/usr/local/bin/zipinfo
install  -m 555 /usr/ports/archivers/unzip/work/unzip60/unix/zipgrep /usr/ports/archivers/unzip/work/stage/usr/local/bin
install  -m 444 /usr/ports/archivers/unzip/work/unzip60/man/unzip.1  /usr/ports/archivers/unzip/work/stage/usr/local/share/man/man1
cd /usr/ports/archivers/unzip/work/unzip60/man && install  -m 444 funzip.1 unzipsfx.1 zipgrep.1 zipinfo.1  /usr/ports/archivers/unzip/work/stage/usr/local/share/man/man1
cd /usr/ports/archivers/unzip/work/unzip60 && install  -m 0644 README WHERE /usr/ports/archivers/unzip/work/stage/usr/local/share/doc/unzip
====> Compressing man pages (compress-man)
===>  Installing for unzip-6.0_8
===>  Checking if unzip is already installed
===>   Registering installation for unzip-6.0_8
Installing unzip-6.0_8...
===>  Cleaning for unzip-6.0_8

来自:https://dude6.com/article/182115.html
问题:
php的这段代码,不支持访问http时redirect到https,如:
访问:http://jtgl.beijing.gov.cn/jgj/lszt/659722/660341/index.html
307 Temporary Redirect导到:https://jtgl.beijing.gov.cn/jgj/lszt/659722/660341/index.html

请将该函数修改成能自动导到https并获取到相应body内容:
//发起https的get请求
function https_get($url,$timeout=120){
   $curl = curl_init();
   curl_setopt($curl, CURLOPT_URL, $url);
   curl_setopt($curl, CURLOPT_HEADER, 0);
   curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
   curl_setopt($curl, CURLOPT_TIMEOUT,$timeout);
   curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);  // 跳过检查                                                                                                                  
   curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);  // 跳过检查                                                                                                                  
   $res = curl_exec($curl);                                                                                                                                                          
   curl_close($curl);                                                                                                                                                                
   return $res;   //返回json对象                                                                                                                                                    
}  

回答:
要在PHP中自动将HTTP请求重定向到HTTPS并获取响应内容,您可以使用curl来检测HTTP响应头中的重定向,然后执行相应的HTTPS请求。以下是修改后的函数示例:

function https_get($url, $timeout = 120) {
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_HEADER, true);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($curl, CURLOPT_TIMEOUT, $timeout);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); // 启用重定向跟随

    $response = curl_exec($curl);

    $httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
    if ($httpCode == 301 || $httpCode == 302) {
        $matches = array();
        preg_match('/Location:(.*?)\n/', $response, $matches);
        $newUrl = trim(array_pop($matches));

        if (!empty($newUrl)) {
            curl_setopt($curl, CURLOPT_URL, $newUrl);
            $response = curl_exec($curl);
        }
    }

    curl_close($curl);
    return $response;
}

$url = "http://jtgl.beijing.gov.cn/jgj/lszt/659722/660341/index.html";
$response = https_get($url);
echo $response;


php -a 测试是OK的。




问题二:那直接在shell下用curl命令实现上面307的Location转向获取到转向后的内容,用什么参数实现呢?我记得好像是有相应参数的。
是的,您可以使用`curl`命令行工具来获取重定向后的内容。要实现HTTP 307重定向的自动跟随,您可以使用`-L`或`--location`参数,这会让`curl`自动跟随重定向并获取最终的内容。下面是示例:


使用`-L`参数,`curl`将自动处理HTTP 307 Temporary Redirect,并获取最终的内容。

3XX response code


       -L, --location
              (HTTP) If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this option will make
              curl redo the request on the new place. If used together with -i, --include or -I, --head, headers from all requested pages will be shown. When authentication is used, curl
              only sends its credentials to the initial host. If a redirect takes curl to a different host, it will not be able to intercept the user+password. See also --location-
              trusted on how to change this. You can limit the amount of redirects to follow by using the --max-redirs option.
1、命令行直接打开「控制台」应用程序:/System/Applications/Utilities/Console.app
2、手工打开「控制台」应用程序步骤:使用 Spotlight 搜索:点击屏幕右上角的放大镜图标或按下 Command + 空格键,然后在弹出的搜索栏中输入 "控制台"(Console)。

在搜索结果中,你应该会看到 "控制台" 应用程序的图标。点击它以打开应用程序。

一旦打开 "控制台" 应用程序,你将看到左侧的导航栏,其中包含不同类型的日志。你可以选择 "日志报告" 以查看系统日志文件。
==============================================================================================
崩溃报告(Crash Reports):这些报告通常包含有关应用程序或进程崩溃的信息。如果 WindowServer 或其他进程崩溃,相关信息可能会出现在这些报告中。

Spin报告(Spin Reports):Spin 报告包含关于进程的信息,可能会显示进程卡住的情况。这些报告可能提供一些线索,说明哪个进程可能导致了问题。

日志报告(Log Reports):日志报告通常包含系统和应用程序的日志信息。虽然它们不是系统日志,但可能包含有关 WindowServer 或其他进程活动的记录。

诊断报告(Diagnostics Reports):诊断报告通常是系统生成的详细报告,用于识别和解决问题。你可以查看这些报告以获取更多信息。

请打开这些报告,查看是否有与 WindowServer 或其他进程相关的信息,以便更好地了解问题的根本原因。如果你不确定如何解释报告中的信息或需要进一步的帮助,建议联系 Apple 支持或专业人员进行更详细的故障排除。感谢你的耐心和理解。
系统类型:64 位操作系统, 基于 x64 的处理器
经实践发现得安装:X86的,64位的无效。
下载:vcredist_x86.exe
DownLoadURL: https://download.microsoft.com/download/1/6/5/165255E7-1014-4D0A-B094-B6A430A6BFFC/vcredist_x86.exe
微软官网下载入口:https://www.microsoft.com/zh-cn/download/details.aspx?id=26999

来自:https://zhuanlan.zhihu.com/p/651888193
实际修改二进制步骤:https://www.windows11.pro/1359.html
<span>00000008 行中 FE 下<strong>的 03 值</strong>,如下面的屏幕截图所示。</span>
<p><strong><span>6.</span></strong><span>按</span><strong><span>DEL</span></strong><span>删除</span><strong><span>03</span></strong><span>并键入</span><strong><span>01</span></strong><span>。</span></p>

导出再修改:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3]
"Settings"=hex:30,00,00,00,fe,ff,ff,ff,7a,f4,00,00,03,00,00,00,3c,00,00,00,3c,\
  00,00,00,00,00,00,00,fc,03,00,00,80,07,00,00,38,04,00,00,78,00,00,00,01,00,\
  00,00



Windows11是一款由微软公司推出的PC操作系统,在该版本中,开发商进行了一系列的更新和优化,那么不少用户在下载win11下载安装之后,应该怎么把任务栏放左边呢?现在通过这篇文章给大家介绍一下。

首先使用键盘快捷键“Win+R”调出运行程序。
在运行中输入“regedit”,回车确定,打开注册表编辑器。
将如下路径复制到注册表路径中“\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3”


然后在右侧找到“settings”,双击打开它。

然后找到“00000008”一行,“FE”一列下的数值,将它改为“00”即可。
点击在新窗口中浏览此图片

这里“00”表示“左边”,“01”表示“上方”,“02表示右边”,“03”表示“底部”。

From:https://g.pconline.com.cn/x/1628/16289115.html

https://answers.microsoft.com/zh-hans/windows/forum/all/%E6%88%91%E5%9C%A8%E6%B3%A8%E5%86%8C%E8%A1%A8/bc7546bf-c353-420d-9386-775255c9e8a2

https://zhuanlan.zhihu.com/p/385038278
在Mac上,软链接(symbolic link)是一种特殊类型的文件,它指向另一个文件或目录的路径。默认情况下,当你使用打包工具(例如tar命令)打包软链接时,会将软链接本身打包进去,而不是它所指向的实际文件。

如果你想要在打包时将软链接解析成实际文件路径并打包实际文件,可以使用-L选项来强制解析软链接。这样,打包工具会将软链接解析成实际文件,并将实际文件打包进去。

下面是使用tar命令打包时解析软链接的示例命令:


这个命令会将/path/to/symlink软链接解析成实际文件,并将实际文件打包到archive.tar.gz中。

另外,如果你想要直接拷贝软链接所指向的原始文件,而不是拷贝软链接本身,可以使用cp命令的-L选项。这样,cp命令会拷贝软链接所指向的实际文件而不是软链接本身。

下面是使用cp命令拷贝软链接指向的原始文件的示例命令:

这个命令会拷贝/path/to/symlink软链接所指向的实际文件到/path/to/destination目录中。

请注意,tar命令和cp命令中的-L选项可能在不同的操作系统和版本中略有不同,请根据你的系统和命令版本来查阅相关文档以确保正确使用。


=========
在 CentOS 7 中,systemctl 会根据服务的名称在 /var/run 目录下的 systemd 子目录创建对应的 PID 文件。具体来说,对于服务名称为 pdfwatcher 的服务,systemctl 会在 /var/run/systemd/ 目录下创建一个名为 pdfwatcher.service 的 PID 文件。

你可以通过以下命令查看该 PID 文件的内容:

bash
Copy code
cat /var/run/systemd/pdfwatcher.service
该文件中只包含一个数字,即 pdfwatcher 服务的进程号。这样,systemctl 就可以根据 PID 文件来跟踪服务的进程,并执行相应的管理和控制操作。

请注意,/var/run 目录通常在系统启动时自动挂载,并用于存储运行时的变量数据和进程相关信息。因此,当服务启动时,systemd 会自动在这个目录下创建 PID 文件。




User
我没有找到对应的pid文件,我的systemctl的service文件是写成这样的,为何没有生成呢?
cat /usr/lib/systemd/system/pdfwatcher.service
# It's not recommended to modify this file in-place, because it
# will be overwritten during upgrades.  If you want to customize,
# the best way is to use the "systemctl edit" command.

[Unit]
Description=pdfwatcher is a real-time monitoring pdf file chmod value is no longer 400 and alarm daemon
After=network.target

[Service]

Type=forking

ExecStart=/usr/local/pdfwatcher/bin/pdfwatcherd -d

ExecStop=/usr/local/pdfwatcher/bin/pdfwatcherd stop

PrivateTmp=true

[Install]
WantedBy=multi-user.target
import cycle not allowed
而且如果项目很大的时候,一个包下面有很多 .go 文件,只提示包与包的循环引用(如上图),是很难定位到哪个 .go 文件和哪个 .go 文件直接进行了循环引用,难以排查。

go-cyclic run --dir  ~/go_learning/src/pdfwatcher.src.cctv.cn
Failed. 1 circular dependence chains were found.

┌---→  /Users/jackXiang/go_learning/src/pdfwatcher.src.cctv.cn/Requests/Request.go
┆                                       ↓
└---     /Users/jackXiang/go_learning/src/pdfwatcher.src.cctv.cn/Loger/Loger.go


安装:
go install github.com/elza2/go-cyclic@latest
go: downloading github.com/elza2/go-cyclic v1.1.0
go: downloading github.com/fatih/color v1.15.0
go: downloading golang.org/x/mod v0.8.0
go: downloading github.com/urfave/cli/v2 v2.24.4
go: downloading github.com/mattn/go-isatty v0.0.17
go: downloading github.com/mattn/go-colorable v0.1.13
go: downloading golang.org/x/sys v0.6.0
go: downloading github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2
go: downloading github.com/russross/blackfriday/v2 v2.1.0



来自:https://link.zhihu.com/?target=https%3A//github.com/elza2/go-cyclic
背景:容器中用docker stop  4d393592c6ec ,sameersbn/redmine:5.0.5 的容器会产生如下日志,docker logs 4d393592c6e  #docker stop 4d393592c6ec  会触发下面的退出,而不是臆想的主动退出了,是手工执行出现docker 退出。

2023-05-18 07:52:16,943 WARN received SIGTERM indicating exit request
2023-05-18 07:52:16,943 INFO waiting for unicorn, cron, nginx to die
2023-05-18 07:52:16,945 INFO stopped: nginx (exit status 0)
2023-05-18 07:52:16,946 INFO stopped: cron (terminated by SIGTERM)
2023-05-18 07:52:17,947 INFO stopped: unicorn (exit status 0)

是一个SIGTERM信号,kill -l 发现15) SIGTERM,编号15,才知道是我自己停止的,而不是长时间运行出现自动退出。这个很重要,因为容器的稳定性相当重要。
下面就以这段C代码进行模拟容器的退出并发SIGTERM信号,如下:
test.c


send.c 用于发送SIGTERM 信号给test


SIGTERM : 程序结束信号,与SIGKILL不同的是该信号可以被阻塞和处理。通常用来要求程序自己正常退出。Shell命令kill 默认产生这个信号。
gcc  test.c -o test
gcc  send.c -o send
运行程序:
./test

./send 12345  //12345是test的pid



终端下输入:
kill 12345
也会给test发送SIGTERM 信号。
or kill -15 12345
kill -SIGTERM 12345



来自:https://blog.csdn.net/a379039233/article/details/80715461
More signal:
#kill -l
1) SIGHUP       2) SIGINT       3) SIGQUIT      4) SIGILL       5) SIGTRAP
6) SIGABRT      7) SIGBUS       8) SIGFPE       9) SIGKILL     10) SIGUSR1
11) SIGSEGV     12) SIGUSR2     13) SIGPIPE     14) SIGALRM     15) SIGTERM
16) SIGSTKFLT   17) SIGCHLD     18) SIGCONT     19) SIGSTOP     20) SIGTSTP
21) SIGTTIN     22) SIGTTOU     23) SIGURG      24) SIGXCPU     25) SIGXFSZ
26) SIGVTALRM   27) SIGPROF     28) SIGWINCH    29) SIGIO       30) SIGPWR
31) SIGSYS      34) SIGRTMIN    35) SIGRTMIN+1  36) SIGRTMIN+2  37) SIGRTMIN+3
38) SIGRTMIN+4  39) SIGRTMIN+5  40) SIGRTMIN+6  41) SIGRTMIN+7  42) SIGRTMIN+8
43) SIGRTMIN+9  44) SIGRTMIN+10 45) SIGRTMIN+11 46) SIGRTMIN+12 47) SIGRTMIN+13
48) SIGRTMIN+14 49) SIGRTMIN+15 50) SIGRTMAX-14 51) SIGRTMAX-13 52) SIGRTMAX-12
53) SIGRTMAX-11 54) SIGRTMAX-10 55) SIGRTMAX-9  56) SIGRTMAX-8  57) SIGRTMAX-7
58) SIGRTMAX-6  59) SIGRTMAX-5  60) SIGRTMAX-4  61) SIGRTMAX-3  62) SIGRTMAX-2
63) SIGRTMAX-1  64) SIGRTMAX
原因
此磁盘已经被其他进程占用。

解决方法
方法1
ps -aux |grep " image(创建的磁盘名称)"
//通过上述命令找到相关进程杀死(该磁盘可能被别人占用,建议询问后在杀)
kill -9 “上述命令查出的进程号”
重新拉虚拟机
方法2
sb.img文件镜像大小制作: qemu-img create -f qcow2 sb.img 50G
启动虚拟机 fdisk -l 查看查看磁盘信息 一般会输出/dev/vda或/dev/vdb信息
mkfs.ext4 /dev/vda 格式化磁盘(分区磁盘,查看本地/document/Newer_enviroment_construct/分区磁盘命令)
新建一个文件夹mkdir /tmp , 并挂载磁盘 mount /dev/vda /tmp
替换原来的disk

实践如下:
ps -aux|grep "win10"
root     1519052  2.3  0.1 883548 92928 ?        Sl   14:51   1:25 /usr/bin/qemu-img convert -f qcow2 -O qcow2 -o compat=1.1,lazy_refcounts /backup/virtImages/win10_bak_10_10_0_119.img /backup/virtImages/win10_bak_10_10_0_168.img


kill -9 1519052


错误如下:
启动域时出错: 内部错误:process exited while connecting to monitor: 2023-05-12T07:49:37.817008Z qemu-kvm: -blockdev {"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage","backing":null}: Failed to get "write" lock
Is another process using the image [/backup/virtImages/win10_bak_10_10_0_119.img]?

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 75, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 111, in tmpcb
    callback(*args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 66, in newfn
    ret = fn(self, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/object/domain.py", line 1280, in startup
    self._backend.create()
  File "/usr/lib64/python3.6/site-packages/libvirt.py", line 1234, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: 内部错误:process exited while connecting to monitor: 2023-05-12T07:49:37.817008Z qemu-kvm: -blockdev {"node-name":"libvirt-2-format","read-only":false,"driver":"qcow2","file":"libvirt-2-storage","backing":null}: Failed to get "write" lock
Is another process using the image [/backup/virtImages/win10_bak_10_10_0_119.img]?

来自:https://blog.csdn.net/qq_36657175/article/details/124748507
在Windows上,虽然它不是通用的,但许多应用程序都支持快捷键Ctrl + Shift + V来粘贴而不格式化。其中包括Chrome,Firefox和Evernote。

要在Mac上以纯文本格式粘贴,您可以使用笨拙的快捷键Option + Cmd + Shift + V粘贴而无需格式化。这是系统范围的快捷方式,因此与Windows不同,它应可在任何地方使用。


在 Mac 系统中,使用以下快捷键可以复制 Word 中的纯文本内容而不带样式:
Command + Shift + V
在 Word 中,将文本从一个位置复制到另一个位置时,默认情况下会保留原始文本的格式和样式。如果您只想复制纯文本,可以使用这个快捷键,它可以在将文本粘贴到目标位置时自动去除原有格式和样式。


word如何在表格和标题之间插入空白行?
https://www.zhihu.com/question/569150619
brew list java|grep java.security
/usr/local/Cellar/openjdk/18.0.2/libexec/openjdk.jdk/Contents/Home/conf/security/java.security


java无法连接SqlServer 出现安全限制的解决方法(TLS加密被拒绝)

集群mysql:1、改了2个my.cnf  wait_timeout=60 ;  与jar配置相同 2、同步了新的数据库3、17.26:8202上的前端指向了集群库Q: 26上连接ssl集群有个异常,Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocolA:修改jre/lib/security/java.security中的jdk.tls.disabledAlgorithms,删除SSLv3, TLSv1, TLSv1.1,然后重启应用即可

/usr/local/jdk8/jre/lib/security/java.security
# jdk.tls.disabledAlgorithms=SSLV3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \


来自:https://blog.csdn.net/kfepiza/article/details/119084415



Linux:
pm -ql jdk-1.8.0_66|grep java.security
/usr/local/java/jre/lib/security/java.security

宋朝锐意改革的王安石,毛主席对他的评价,为何会是这12个字
https://mp.weixin.qq.com/s/NDdfo19IAR3IiiktJq7aWg?from=singlemessage&isappinstalled=0&scene=1&clicktime=1681816969&enterid=1681816969
“燕云十六州”迟迟收不回来,大宋就无法用少量兵力完成国家层面的防御,为了解决这个问题,只能囤积重兵保卫首都等重点城市,而为了在体系内制衡各级官员,大宋又只好增加体制内的人员来相互制约。


朱元璋在至暗时刻的顿悟
https://mp.weixin.qq.com/s?__biz=MzIzNjQxNTQyOQ==&mid=2247484599&idx=1&sn=4414ec5783ebb7f64656b0d1ee426800&chksm=e8d9741ddfaefd0b5be45ce5b5863df3f04188fe030fdb73a775a9764e5b262e5aa2961d8e81&scene=132#wechat_redirect
曾国藩曾语重心长的教导自家晚辈,“作人之道,惟‘骄’‘惰’二字误事最盛。”

什么是“骄”?自我膨胀谓之“骄”,如果在此基础上再自以为是,觉得自己聪明盖世,下一分苦功等于别人下十分,此谓之“惰”。

分页: 1/339 第一页 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 下页 最后页 [ 显示模式: 摘要 | 列表 ]