Win11_taskbar_chg2_Win10_taskbar.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Start_ShowClassicMode"=dword:00000001
| #!/bin/bash | |
| cd ~/Jupyter | |
| PROC_NAME=jupyter-lab | |
| ProcNumber=`ps -ef |grep -w $PROC_NAME|grep -v grep|wc -l` | |
| #echo $ProcNumber | |
| if [ $ProcNumber -le 0 ];then | |
| echo "--->run jupyter-lab<---" | |
| /usr/local/bin/jupyter-lab --ip=0.0.0.0 --allow-root > /dev/null 2>&1 & | |
| fi | |
| export localhost_ip=`ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d addr:` |
Win11_taskbar_chg2_Win10_taskbar.reg
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Start_ShowClassicMode"=dword:00000001
| #!/bin/sh | |
| ################################################ | |
| # 设置 WSL2 网络为桥接模式 (Default use host WLAN) | |
| # Change WSL to bridge mode (Default use host WLAN) | |
| ################################################ | |
| #export PATH=$PATH:/mnt/c/Windows/System32 | |
| #export PATH=$PATH:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/ | |
| #让WSL改变为网桥模式(无线使用 WLAN,有线使用 以太网 ,powershell 下使用 NetAdapter 命令查看) | |
| #Change WSL to bridge mode (Default use host WLAN) | |
| /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/powershell.exe -command "Set-VMSwitch WSL -NetAdapterName WLAN" |
/etc/resolv.conf nameserver xxx.xxx.xxx.xxx ---It's host IP
export HOSTIP=`cat /etc/resolv.conf|grep nameserver| head -n 1|cut -d" " -f 2`
echo $HOSTIP
QListWidget如何绘制圆角
CusListwidget::CusListwidget(Qwidget *parent) : QListwidget (parent){
Qwidget: :setwindowFlag(Qt: :FramelessWindowHint);
Qwidget::setAttribute(Qt: :wA_ TranslucentBackground);QPalette p(Qwidget: :palette();
p.setColor(QPalette: : Base, Qt: :transparent);Qwidget: :setAutoFillBackground(true);
Qwidget::setPalette(p)3
QListwidget: : setFramestyle(QF rame : :NoFrame);
}
void CusListWidget: :paintEvent(QPaintEvent *e){
| // vim: syntax=c | |
| int daemon( int nochdir, int noclose ) | |
| { | |
| pid_t pid; | |
| if ( !nochdir && chdir("/") != 0 ) //if nochdir=0,change dir to "/" | |
| return -1; | |
| if ( !noclose ) //if noclose is 0 | |
| { | |
| int fd = open("/dev/null", O_RDWR); | |
| if ( fd < 0 ) |
1.请在 cygwin 里的/etc/profile文件的开头部位加上 export WORKDIR=$PWD ,末尾部位加上 cd $WORKDIR
因为执行类似 I:\cygwin64\bin\bash.exe --login -c "echo $PWD" 这样的命令时,工作目录才不会改变成 /home/Administrator
2.cygwin gcc 编译时可能需要配置一些环境变量等,可以在.vscode/settings.json里加上下面的配置 bash 无 --login 参数时,将执行BASH_ENV配置的文件
"terminal.integrated.env.windows": {
"Path":"",
"OSTYPE":"cygwin",
| // vim: syntax=c++ | |
| #include <windows.h> | |
| #include <tchar.h> | |
| #include <iostream> | |
| #include <strsafe.h> | |
| #include <io.h> | |
| #include <list> | |
| #include <algorithm> | |
| #include <fcntl.h> |
GCC_ARCH="-m32" AR="arm-linux-ar" RANLIB=arm-linux-ranlib CC=arm-linux-gcc LD=arm-linux-ld AS=arm-linux-as PROCESSOR=ARM ./Configure linux-armv4 no-asm shared -DL_ENDIAN -D_GNU_SOURCE --prefix=/arm-linux --openssldir=/arm-linux/etc/ssl
error: PTHREAD_MUTEX_RECURSIVE undeclared 添加 -D_GNU_SOURCE 然后删除Makefile里两处 -m64 --------------------------------完美成功 openssh --------------------------------完美成功
gcc------------------------------------ tcc-0.9.27----------------------
GCC_ARCH="-m32" AR="arm-linux-ar" RANLIB=arm-linux-ranlib CC=arm-linux-gcc LD=arm-linux-ld AS=arm-linux-a PROCESSOR=ARM
./configure --prefix=/arm-linux/opt/tcc \
--sysroot=/arm-linux \
--cross-prefix=arm-linux- \
--libpaths=/arm-linux/lib \
--crtprefix=/arm-linux/sysroot/usr/lib \