MIUI 11 之无线显示

最近把自己的手机系统更新到了 MIUI 11 ,新系统新气象,还是有不少可圈可点的优点。不过对于新的“投屏”功能实在是爱不起来。简而言之,小米用了一个第三方的多功能投屏 App 替代了原本 Android 系统自有的“无线显示”功能,并且删除了系统无线显示功能的入口。新的投屏 App 可谓差强人意,虽然多了许多之前不具备的功能,但是有时候在投屏到电脑时反而会出现比如连接上的问题。

其实系统原本的无线显示(Miracast)功能还是在的,只不过被隐藏了。经过少许摸索,发现可以使用活动启动器 (Activity Launcher) ,并通过如下方式开启系统无线显示功能:

启动“活动启动器” ➡ 点击上方搜索按钮 ➡ 输入“无线显示”。

在下方搜索结果中会显示系统自带的无线显示(com.android.settings.Settings$MiracastSettingsActivity)

点击即可进入系统自带的无线显示功能。

为了便于日后直接使用,可以长按前一步搜索结果中的“无线显示”项目,然后选择创建快捷方式,在桌面建立“无线显示”的快捷方式。


活动启动器(Activity Launcher) 的 Google Play 地址:
https://play.google.com/store/apps/details?id=de.szalkowski.activitylauncher&hl=en_US

RIP Onedrive

今天 Onedrive 似乎、貌似、好像又“翘”了涅。正好用 Word 在线编辑文档编辑到一半,它奶奶个熊

只需 trace 域名 1drv.ms 便可知晓。现在到半途就嗝屁了。

   3    10 ms    12 ms     6 ms  61.152.51.53
4 7 ms 5 ms 6 ms 101.95.120.238
5 6 ms * 6 ms 202.97.57.157
6 24 ms 22 ms 21 ms 202.97.35.138
7 52 ms 53 ms 53 ms 202.97.6.50
8 * * * Request timed out.
9 * * * Request timed out.
10 * * * Request timed out.
11 * * * Request timed out.
12 * * * Request timed out.
13 * * * Request timed out.
14 * * * Request timed out.

7 月中上旬“翘”了几天,现在又“翘”了。看来距离被彻底的不可描述不远了吧。 ( 狗头保命)


Update: 当日(7/31)晚恢复了

WUnderground Free API is closed.

Have been used Weather Underground free API for my personal use for the last couple of years. However, it has been broken since yesterday. Unable to retrieve weather data and only thing I got from the response is “invalidkey”. Then I logged in to my weather underground developer account, there was an error message: “the API key has been disabled manually”.

So, what is wrong? I only use this key to show local weather information in my place, designed to fetch information every 15 minutes from wunderground.com, way below the limits. (Free API can have 500 calls per day, 10 calls per minute.)

Later, I found there is a message appeared on the homepage of WeatherUnderground API says “we will no longer provide free API keys“. Also there is a post on the official community website says “Your subscriptions, and therefore access, will continue to work through 12/31/2018.(https://apicommunity.wunderground.com/weatherapi/topics/end-of-service-for-the-weather-underground-api?topic-reply-list[settings][page]=4#topic-reply-list)

I also Googled, there were discussions about this since mid-2018. Looks like, they have planned for a long time. However, I searched my inbox, there is nothing sent from weather underground in the last year.

It is time switch to another weather API provider now.

(Workaround) To remove a stubborn package on Debian.

I have a Buffalo LinkStation, which I installed Debian Stretch on it.

Recently, I was trying to remove obsolete packages by using “apt-get autoremove” command after an update. Usually this process will take a couple of minutes. But this time, unfortunately there was a package (to be more specific, an old kernel) which refused to be removed by apt or dpkg. Continue reading (Workaround) To remove a stubborn package on Debian.

一不留神被转义字符坑了一小下。或者说是自己把自己坑了一小下。

之前写过个小程序,其中有个功能是通过源JSON中的title值对文件进行重命名。

本来就有文件名过滤的方法用于将JSON中的非法字符给替换掉。不过最近JSON格式略有改变,有些title里会加入转义字符(Escape sequence),比如 “ \t ”。这么一来如果在Windows下直接将这种title用于目标文件名是会报错的。已有的替换方法会将JSON中常见的非法字符替换为全角字符(比如 “ * ” 变成 “*” 这样),于是我就轻车熟路加上了对于 \t 的处理语句(其实只要清掉它即可)。不过没留神的是,因为 C# 里面平时替换反斜杠(backslash)的时候是用 2 条反斜杠作为 keyword 进行字符串替换。于是在加入这个新东西的时候,习惯性的输入 String.Replace(“\\t”, “”);

于是程序就很有个性的无视了源数据里面的那个\t,搞得我调试了好一会儿,最后发现是自己秀逗了,应该用 “\t” 作为关键字而非 “\\t”。因为 \t 已经是 C# 中自带的转义字符了[1],若在此使用 2 条反斜杠反而适得其反,使得意义完全不同了。

(环境:VS Express 2013 for Desktop)


[1] https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2013/h21280bw(v=vs.120)