使用属性 Window.SizeToContent
参考:
https://stackoverflow.com/questions/3177138/how-can-i-get-a-wpf-window-to-expand-to-fit-the-contents-of-a-dynamically-changi
https://docs.microsoft.com/en-us/dotnet/api/system.windows.window.sizetocontent
Saturday, December 29, 2018
Friday, December 28, 2018
C3850-48P-L Switch 升级固件
Cisco IOS-XE 3.x
1. 下载 IOS-XE .bin 文件,链接https://software.cisco.com/download/home/284455380/type/282046477/release/3.6.9E(须先登录 Cisco 账户)
2. 通过 TFTP 传输 .bin 文件到交换机 flash
copy tftp://192.168.1.10/cat3k_caa-universalk9.SPA.03.06.09.E.152-2.E9.bin cat3k_caa-universalk9.SPA.03.06.09.E.152-2.E9.bin3. Install 模式升级
software install file flash:cat3k_caa-universalk9.SPA.03.06.09.E.152-2.E9.bin4. 清理
software clean
若要升级到 Cisco IOS-XE 16.x 版本,遇到兼容性检测提示未满足包依赖
Candidate package compatibility checks failed because the following则可尝试在安装命令后添加 new force
package dependencies were not satisfied. Operation aborted.
software install file flash:cat3k_caa-universalk9.16.06.04a.SPA.bin new force
Cisco IOS-XE 16.x
1. Install 模式升级
request platform software package install switch all file flash:cat3k_caa-universalk9.16.06.04a.SPA.bin2. 清理
request platform software package clean switch all file flash:或者
request platform software package clean注: 16.x 版本无 software install / software clean 命令,这里 switch all 指的是所有 switch
参考:
https://www.cisco.com/c/en/us/support/docs/switches/catalyst-3850-series-switches/117552-technote-cat3850-00.html
https://www.booches.nl/2016/03/cisco-ios-xe-16-x/
https://community.cisco.com/t5/switching/unable-to-use-quot-software-quot-command-on-cisco-catalyst-3850/td-p/2978615
https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3850/software/release/16-3/release_notes/ol-16-3-3850.html
Thursday, December 27, 2018
WPF 问题记录之 DataGridCell 的 TextBlock.Padding 属性不生效
修改 DataGridCell 的 TextBlock.Padding 属性或者 Padding 属性不生效
方案1,修改ControlTemplate
参考:
https://stackoverflow.com/questions/5246745/set-a-padding-on-datagridcells-in-wpf
方案2 ,修改 DataGridTextColumn 的 ElementStyle 属性
参考同一个贴子最上面的楼主回复
https://blogs.msdn.microsoft.com/vinsibal/2008/08/19/wpf-datagrid-stock-and-template-columns/
Thursday, December 20, 2018
激活 Windows Server 2016 虚拟机里的系统
1. 查看当前系统(评估版本)可以升级到的版本
2.升级
ProductKey 参考:https://www.altaro.com/hyper-v/hyper-v-automatic-virtual-machine-activation-windows-server-2016/
参考:
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj574204(v=ws.11)
https://social.technet.microsoft.com/Forums/windows/en-US/7e10693b-4317-4a48-b3a5-80744b96a816/windows-2012-r2-standard-evaluation-to-licenced-version?forum=winserver8setup
DISM /online /Get-TargetEditions
2.升级
DISM /online /Set-Edition:<edition ID> /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
Guest Operating System | Key |
---|---|
Windows Server 2012 R2 Essentials | K2XGM-NMBT3-2R6Q8-WF2FK-P36R2 |
Windows Server 2012 R2 Standard | DBGBW-NPF86-BJVTX-K3WKJ-MTB6V |
Windows Server 2012 R2 Datacenter | Y4TGP-NPTV9-HTC2H-7MGQ3-DV4TW |
Windows Server 2016 Essentials | B4YNW-62DX9-W8V6M-82649-MHBKQ |
Windows Server 2016 Standard | C3RCX-M6NRP-6CXC9-TW2F2-4RHYD |
Windows Server 2016 Datacenter | TMJ3Y-NTRTM-FJYXT-T22BY-CWG3J |
ProductKey 参考:https://www.altaro.com/hyper-v/hyper-v-automatic-virtual-machine-activation-windows-server-2016/
参考:
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/jj574204(v=ws.11)
https://social.technet.microsoft.com/Forums/windows/en-US/7e10693b-4317-4a48-b3a5-80744b96a816/windows-2012-r2-standard-evaluation-to-licenced-version?forum=winserver8setup
Tuesday, December 11, 2018
查看FortiGate防火墙硬件参数
查看FortiGate防火墙硬件参数:CPU, RAM, Flash, Hard Disk
Dashboard -> CLI Console:
Dashboard -> CLI Console:
get hardware status
一些有用的网站
Windows系统安装界面认不到硬盘,加载RST驱动: https://iknow.lenovo.com.cn/detail/419926.html 纯净版Flash: https://gitlab.com/cleanflash/installer/-/releases ...
-
关于 /etc/dnsmasq.conf 文档 #resolv-file= 用来指定上游 DNS 服务器列表所在文件路径,默认注释掉,意思等同于 resolv-file=/etc/resolv.conf ,这里改为/etc/resolv.dnsmasq.conf se...
-
net-speeder 的使用方法为 ./net_speeder 网卡名 加速规则 其中加速规则采用 bpf 规则,一般常用下面规则来启动 ./net_speeder venet0 "ip" ./net_speeder venet0 ...
-
1、下载IOS软件并把IOS软件(.tar格式)存放在TFTP服务器 2、执行 archive download-sw /overwrite /reload tftp://192.168.11.38/c2960s-universalk9-tar.152-2.E9.tar 参考:...