博文

小米手机刷LineageOS连接WIFI显示受限

 WIFI状态显示依赖系统访问一个网络路径,连通说明本机网络条件良好。不过Lineage是国外团队,系统配置的网络路径国内不方便访问。将手机连接adb后执行下面两条命令即可。 adb shell "settings put global captive_portal_http_url http://connect.rom.miui.com/generate_204"; adb shell "settings put global captive_portal_https_url https://connect.rom.miui.com/generate_204";

golang标准库encoding/xml解析格式

  The name for the XML elements is taken from, in order of preference: the tag on the XMLName field, if the data is a struct the value of the XMLName field of type Name the tag of the struct field used to obtain the data the name of the struct field used to obtain the data the name of the marshaled type The XML element for a struct contains marshaled elements for each of the exported fields of the struct, with these exceptions: the XMLName field, described above, is omitted. a field with tag "-" is omitted. a field with tag "name,attr" becomes an attribute with the given name in the XML element. a field with tag ",attr" becomes an attribute with the field name in the XML element. a field with tag ",chardata" is written as character data, not as an XML element. a field with tag ",cdata" is written as character data wrapped in one or more <![CDATA[ ... ]]> tags, not as an XML element. a field with tag ",innerxml" is writte

golang格式化format

图片
  Golang的格式化字符串由普通字符和占位符组成,如: "abcd%+ #8.3[3]vefg" 其中abcd和efg是普通字符,其他部分是占位符。占位符以%开头,以动词结尾,格式如下: % [旗标] [宽度] [.精度] [arg索引] 动词 其中,方括号中的内容是可缺省的。 1.1旗标 旗标有以下几种: +: 对于数值类型总是输出正负号;对于%q(%+ q )保证只输出ASCII编码的字符 -: 在右边进行宽度填充,而不是默认的左边。 空格: 对于数值类型的正数,保留一个空白的符号位(其它用法在动词部分说明)。 0 : 用 0 进行宽度填充而不用空格,对于数值类型,符号将被移到所有 0 的前面。 #: 备用格式:为八进制添加前缀0(%#o);为十六进制添加前缀0x(%#x)或者0X(%#X); 为%p(%#p)去掉前缀0x;。 其中 "0" 和 "-" 不能同时使用,优先使用 "-" 而忽略 "0" 。 格式化转换列表如下: 1.2宽度-精度 宽度与精度的控制格式以Unicdoe码点为单位,这和C的printf不同,它以字节数为单位。两者或者其中之一均可以用'*'表示,此时它们的值会从下一个操作数中获取,该操作数类型必须为int。 对数值而言,宽度为该数值占用区域的最小宽度;精度为小数点后的位数。但是对%g(%G),精度为数字的总和。 对于大多数数值而言,宽度为输出的最小字符串,如果必要则会为已格式化的形式添加空格。 对于字符串,精度为输出的最大字符数,必要时会截断字符串。 1.3占位符 格式 说明 %d 十进制数 %b,%o,%x 二进制、八进制、十六进制整数 %#b,%#o,%#x 二进制、八进制、十六进制整数,并显示相应前缀 %f,%g,%e 浮点数 %t 布尔值: true或者false %c 相应Unicode码点表示的字符 %s 字符串 %U 显示Unicode码点 %q 带双引号的字符串"abc123"或者带单引号的字符'a','b' %v 变量的自然形式(natural format) %#v 使用Go语言类是的语法打印变量值 %T

CUID卡第一扇区数据BCC0 incorrect

[#] BCC0 incorrect, got xxxxxxx [#] Aborting [#] Can't select card 解决方法: hf 14a config --atqa force --bcc ignore --cl2 skip --rats skip # for 1k hf mf wrbl --blk 0 -k FFFFFFFFFFFF -d 11223344440804006263646566676869 --force  #  -d11223344441802006263646566676869 for 4k hf 14a config --std hf 14a reader

[nsis]安装包反编译

  反编译出文件和.nsi脚本 【工具】 7z 15.05版 【下载地址】 https://sourceforge.net/projects/sevenzip/files/7-Zip/15.05/ https://jaist.dl.sourceforge.net/project/sevenzip/7-Zip/15.05/7z1505.exe https://jaist.dl.sourceforge.net/project/sevenzip/7-Zip/15.05/7z1505-x64.exe 【引用】 https://www.cnblogs.com/hack747/p/14744847.html

小米手机连接电脑显示 press any key to shutdown 错误

  手机进入 Fastboot 模式后用数据线连接电脑,手机左上角显示  press any key to shutdown  信息,电脑识别设备失败。 解决方法: 更换电脑 USB 2.0 端口连接便可解决。如果电脑没有 USB 2.0 端口,也可以使用 USB 集线器连接。 如果都没有,可以将下面内容用记事本另存为  .bat  批处理文件(或 直接下载 ) ,然后以管理员身份运行,之后再连接便不会有问题。 还原方法:删除这几个键值即可 @echo off reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\18D1D00D0100" /v "osvc" /t REG_BINARY /d "0000" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\18D1D00D0100" /v "SkipContainerIdQuery" /t REG_BINARY /d "01000000" /f reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\usbflags\18D1D00D0100" /v "SkipBOSDescriptorQuery" /t REG_BINARY /d "01000000" /f pause

ESXI直通硬盘(RDM)

 进入ESXi shell 拼接命令: vmkfstools -z /vmfs/devices/disks/需直通的硬盘路径 [空格]  vmfs/volumes/虚拟存储目录/ 虚拟盘名称.vmdk