latexdiff
during the paper shepherding process. I found it very useful for highlighting changes between different papers versions (basically the submission version and the revised version shared to the shepherd).
Here’s a thorough tutorial on latexdiff
: https://www.overleaf.com/learn/latex/Articles/Using_Latexdiff_For_Marking_Changes_To_Tex_Documents.
I only have one more thing to add. If you have multiple tex files for your paper, before calling latexdiff
you need to run latexpand
on your master tex (say paper_master.tex
).
$ cd paper_dir # latexpand doesn't work outside your paper folder
$ latexpand paper_master.tex > paper_expanded.tex
Once you have paper_old_expanded.tex
and paper_new_expanded.tex
, you need to run
$ latexdiff paper_old_expanded.tex paper_new_expanded > paper_diff.tex
Then you can compile paper_diff.tex
the same way of compiling paper_master.tex
. This means paper.diff
requires the same resources, such as embedded source code files, figures, etc.
If you cannot compile paper_diff.tex
, try the following solutions (and cross your fingers).
xelatex
instead of latex
or pdflatex
. I don’t know why but it appears to me that xelatex
is more robust.latexdiff
preamble with these lines.OpenPLC is good for hobbyists and for research purposes. In this post, I’m using Rockwell Automation products, which are closer to what people use in real factories.
This this video shows how to download the programs.
These programs are Windows-only, and remember to run them with admin privileges (aka, as an administrator
).
RSLinx Classic Lite comes with a bunch of different drivers. By configuring the emulator driver we let our working PC know how to communicate with the emulator. The Station Number
of the PC is 0
, Station Name
could be whatever string we like.
We write PLC programs using ladder logic in RSLogix Micro.
We assign 1
to the emulator’s Station #
, as 0
has been taken by the PC.
After the emulator is set up, RSLinx is able to detect it.
By toggling the input I:0/0
, the output bit O:0/0
changes accordingly.
[1] https://en.wikipedia.org/wiki/Programmable_logic_controller
[2] https://www.youtube.com/watch?v=t9JoLjiwjtw
]]>The authors developed automated methods to detect third-party advertising and tracking services (ATS) at the traffic level. User data were collected with Lumen privacy monitor, which is an Android app runs locally on the device and intercepts all network traffic over both WiFi and mobile network. It’s essentially a VPN proxy that sits between apps and network interfaces. The app itself doesn’t need root access, but it asks the user to grant it the VPN permission. In summary, with Lumen privacy monitor, the authors collected 8.5M flows from 14,599 apps to 40,533 unique fully-qualified domain names (FQDNs) with 13,454 unique second-level domains (SLDs). After classification, 2,121 ATSes (233 are previously unknown) and 730 ATS-capable services were identified. By characterizing ATS domains, the paper uncovers business relationships between service providers. 8/10 top organizations reserve the right to sell or share data with other organizations, while all of them reserve the right to share data with their subsidiaries.
This paper makes a reasonable assumption that first-party domains are considered to be trusted by users when they install apps. Therefore, only third-party domains are in the scope of study. Two categories of third-party domains are defined:
An example of ATS-C is a map API for collecting location data and other information to provide area maps and directions. It doesn’t necessarily rely on tracking users for monetizing their service. However, ATS-Cs can possibly later share data with other parties.
The goal of domain classification is to identify third-party domains, then identifying ATS-related domains (i.e., ATSes and ATS-Cs).
Existing ATS blacklists and URL categorization services both have limitations. Rather than completely relying them, the authors use them to train, test, and curate their domain classifier and results. Their approach consists of three major steps: (1) identifying third-party domains, (2) classifying third-party domains to identify ATS domains (with manual validation of 200 domains), and (3) labeling domains that receive unique identifiers from user devices but were not identified in the previous step as ATS-C
The mobile ATS ecosystem
The paper reports that 292 parent organizations own nearly 2,000 ATS and ATS-C domains. Alphabet (Google’s parent company) has penetration in over 73% of all measured apps with ownership of only 3.6% of all ATS/ATS-C domains. Domains belonging to the same organization are more likely to co-occur.
Application characteristics
The numbers of trackers: free apps with in-app purchases > free apps > paid apps. Apps with in-app purchases may have more aggressive monetization strategies. Games and educational apps are the two categories with the highest number of ATS/ATS-C domains Cross-device tracking is widespread: 39% identified ATSes are present as third-parties in at least one of the Alexa top 1000 websites.
Regulatory challenge
ATS services in US have disproportionately higher access to ATS related data: 40% ATS servers are the end of 73% ATS-related flows. Flows of UIDs from nations in the European Union mostly go to US (89.27%) and China (4.02%). They are likely to be the most impacted by the upcoming regulations.
]]>In my case, if my module’s apk has multiple dex inside, Xposed cannot find the class. After forcing Android Studio to output an apk having only one classes.dex, it works like a charm.
]]>error: only position independent executables (PIE) are supported.
The error message is quite straightforward — the binary is not position independent. If you have the source code, take a look at this stack overflow answer and edit your Android.mk
accordingly.
Things get more complicated if you only have the binary or it’s not feasbile to rebuild it with PIE support. Then this post can help. I stumbled across a workaround on a Chinese website. It’s very easy, even less painful than rebuilding the binary with PIE enabled.
Basically what you only need is a binary editor like 010 Editor. Use it open the binary file, count carefully to find the 17th byte, change the value 02 to 03, and that’s it!
$ xxd gdb | head -2
0000000: 7f45 4c46 0101 0100 0000 0000 0000 0000 .ELF............
0000010: 0200 2800 0100 0000 b06a 0100 3400 0000 ..(......j..4...
$ xxd gdb_pie | head -2
0000000: 7f45 4c46 0101 0100 0000 0000 0000 0000 .ELF............
0000010: 0300 2800 0100 0000 b06a 0100 3400 0000 ..(......j..4...
Save your changes and the modified binary should work well on your Android device.
]]>.sdx
file. This file can be opened by SDM (Secure Download Manager), which is not available in Linux. Fortunately, we have an alternative: Linux SDM Downloader. Clone Linux SDM Downloader’s source code, enter its folder, and run:
$ python main.py ms-software.sdx
You’ll get a .sdc
file and a .sdc.key
file. Next you need another tool to decrypt the sdc file together with the key: xSDM
$ xsdm ms-software.sdc
Make sure that your sdc and sdc.key are located in the same folder.
]]>I’m working on the improvement of Apport in Debian this summer. So far, a few new features has been implemented.
apport-notifyd
is runningapport-retrace
to install absent debug symbolsPreviously, apport-notifyd
notification daemon does not have the ability to shutdown by itself. Thus if the user logs out of his desktop session and then logs back in, he will have more than one instances of the daemon. This will result in multiple apport popups when a crash occurs.
Now apport-notifyd
can detect if there has already been a notification daemon running. If not it will start a new one, otherwise it quits silently.
Sometimes Apport fails to report a crash due to the lack of debugging symbols in the crashed package or its dependencies. When this happens, Apport will prompt a message dialog, telling the user to install absent debug symbols. We added an install button in the dialog, which can let the user install debug symbols immediately, without starting apport-retrace
manually.
-> Fig 1. Click “Install” to install debug symbols <-
apport-retrace
downloads/installs the necessary packages and debug symbols. It used to download all required packages direclty from Debian servers.
The cache folder /var/cache/apt
contains debian packages downloaded by apt-get
. It’s very likely that packages apport-retrace
wants to download have existed in /var/cache/apt
. For such packages we don’t need to download them again – just make copies. This will save bandwith and shorten the waiting time.
Debian has a bug tracking system (BTS) in which we file details of bugs reported by users and developers. Each bug is given a number, and is kept on file until it is marked as having been dealt with.
We’ve integrated Debian BTS into Apport. Before reporting a bug of the crashed package users can browse existing bug reports fetched from Debian BTS. They don’t need to report it again if the bug has alreadly been reported by someone else!
-> Fig 2. Click “Existing Reports” to view reported bugs <-
-> Fig 3. All existing bug reports <-
-> Fig 4. Display details of one bug report <-
]]>Fontconfig warning: "/etc/fonts/conf.d/65-droid-sans-fonts.conf", line 103: Having multiple values in <test> isn't supported and may not work as expected
Fontconfig warning: "/etc/fonts/conf.d/65-droid-sans-fonts.conf", line 138: Having multiple values in <test> isn't supported and may not work as expected
As the warning messages hinted, to get rid of them I should convert multiple values in one <test>
into multiple <test>
tags, each of which only has one value. So I edited the file /etc/fonts/conf.d/65-droid-sans-fonts.conf
.
<test name="lang">
<string>zh-cn</string>
<string>zh-sg</string>
<string>zh-hk</string>
<string>zh-tw</string>
</test>
<test name="lang">
<string>zh-cn</string>
</test>
<test name="lang">
<string>zh-sg</string>
</test>
<test name="lang">
<string>zh-hk</string>
</test>
<test name="lang">
<string>zh-tw</string>
</test>
考虑到240G的容量有限,可能不够日常使用,所以需要保留原来500G的机械硬盘:系统和应用程序安装到SSD上,而home目录的一些数据,比如影音、下载的文件使用HDD存储。在淘宝上买了一个光驱位的硬盘架,这样就可以两块硬盘共存了。光驱和硬盘采用的都是SATA接口,读写速度上不会有区别,所以将SSD或者HDD安装到光驱位都可以(我直接将SSD放入硬盘架装到了光驱位)。
拆卸光驱比较麻烦,需要参考网上的拆机教程。SSD安装成功后重新启动系统,使用Disk Utility进行格式化,然后系统就会自动挂载它为第二块硬盘了。
下一步进行系统迁移:把系统从原来的HDD上克隆到SSD上,然后更改启动盘为SSD。
使用了Carbon Copy Cloner这个app,操作起来非常方便。
左边选择HDD和需要克隆的目录,右边选择目标SSD。因为HDD中的数据量大于SSD的容量,所以对于home目录/Users/username/
,仅同步其中的用户配置文件就可以了。克隆过程并不慢,我用了大约一小时。
接下来,在System Preference - Startup Disk中选择默认启动盘为SSD,重启会发现系统的启动速度变快了。
最后,可以将HDD中的系统删掉,仅用它来存储数据。关于SSD的优化可以参考:http://blog.jjgod.org/2010/04/17/macosx-ssd-tweaks/
]]>When collaborating, people work together (co-labor) on a single shared goal. When cooperating, people perform together (co-operate) while working on selfish yet common goals.
collaborate表示大家一起为同一个目标努力。而cooperate表示大家在一起为各自的目标努力,但可能有相似的目标。