Magic Mouse已经损坏了好长时间了,故障现象就是鼠标无法移动,但是点击,触摸都是有效的。网上搜索了一下,貌似这种故障很多。
大概率是Apple设计原因导致的故障。原因在于这个芯片跟罗技的鼠标用的同一个型号的,而罗技的鼠标很少发生类似的故障。初步猜测是Apple设计的时候,地线是跟外壳联通的,导致静电会沿着金属外壳击穿芯片内部管脚。
Magic Mouse已经损坏了好长时间了,故障现象就是鼠标无法移动,但是点击,触摸都是有效的。网上搜索了一下,貌似这种故障很多。
大概率是Apple设计原因导致的故障。原因在于这个芯片跟罗技的鼠标用的同一个型号的,而罗技的鼠标很少发生类似的故障。初步猜测是Apple设计的时候,地线是跟外壳联通的,导致静电会沿着金属外壳击穿芯片内部管脚。
使用Python脚本的时候,代码中一旦有了中文注释便会报错,类似如下内容:
|
1 2 |
SyntaxError: Non-ASCII character '\xe8' in file ch.py on line 5, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details |
如果文件里有非ASCII字符,需要在第一行或第二行指定编码声明。
在第一行或是第二行加入这么一句
|
1 |
# -- coding: utf-8 -- |
完美解决。
最近中国移动的流量劫持到了令人发指的地步,凡是没有使用HTTPS的网址都会被劫持,非常影响用户体验。如下图所示(右下角):
原本电脑上已经有了Windows 10和ubuntu 16.04双系统,一次磁盘克隆之后(更换硬盘),引导界面消失了,只能进入Windows 10系统,无法进入ubuntu 16.04。
具体的修复办法如下:
If you want a logon password to secure your Windows 10, you can create a password, add a PIN code, and set up a Picture password for your user account. However, sometimes password may bring much inconvenience so that you don't want any password. In this case, just don't set up any password or disable password logon. Now here we show how to disable PIN, Picture and Password logon in Windows 10.
华为WS832已经损坏了很长时间了,一直提示是没有插上网线,明显是WAN口损坏了。跟华为的售后扯皮了几个月,华为拒绝维修,更换政策又非常的不合理,最后的解决方案就只剩下自己维修这一条路了。
最近需要用树莓派2B自带的SPI接口调试CYPRESS的FM25W256-GTR芯片,这里记录一下整个的调试过程。首先是打开树莓派2B自带的SPI接口,默认情况下,这个接口是关闭的。
最近想在自己的联想T440机器上启用内置的指纹识别,具体的执行命令如下:
|
1 2 3 4 5 6 7 8 9 |
$ sudo add-apt-repository ppa:fingerprint/fingerprint-gui $ sudo apt update $ sudo apt install libbsapi policykit-1-fingerprint-gui fingerprint-gui $ sudo apt-get install fprintd libpam-fprintd $ sudo apt install fprint-demo |
目前使用的阿里云服务器是通过阿里云ECS ubuntu 14.04.5 LTS升级到ubuntu 16.04.2 LTS升级上来的,升级之后,一直没有开启PHP 7.0的OpCache。以前感觉性能还够用,最近发现有些卡顿现象,因此想到开启OpCache。
开启命令如下(PHP-FPM模式):
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
$ sudo apt install php7.0-opcache $ sudo phpenmod opcache # PHP-FPM模式的配置文件 $ FILEPATH="/etc/php/7.0/fpm/php.ini" # Enable the opcache. $ SEARCH=";opcache.enable=0" $ REPLACE="opcache.enable=1" $ sudo sed -i "s:$SEARCH:$REPLACE:" $FILEPATH # Set the amount of memory we can use for caching. # The production server has oooooodles of RAM. $ SEARCH=";opcache.memory_consumption=64" $ REPLACE="opcache.memory_consumption=256" $ sudo sed -i "s:$SEARCH:$REPLACE:" $FILEPATH # increase the number of files to cache $ SEARCH=";opcache.max_accelerated_files=2000" $ REPLACE="opcache.max_accelerated_files=1000000" $ sudo sed -i "s:$SEARCH:$REPLACE:" $FILEPATH # Don't bother revalidating files for a long time because # they should never change. # Obviously you need to undo this in dev. $ SEARCH=";opcache.validate_timestamps=1" $ REPLACE="opcache.validate_timestamps=3000" $ sudo sed -i "s:$SEARCH:$REPLACE:" $FILEPATH #重启服务 $ sudo service php7.0-fpm restart |
网站响应速度有明显的飞跃。