tag:blogger.com,1999:blog-79828842024-03-07T14:53:33.356+08:00Li Zhao's HomepageLi-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.comBlogger196125tag:blogger.com,1999:blog-7982884.post-27880088109358759782022-05-18T15:30:00.000+08:002022-05-18T15:30:16.094+08:00Is Wayland matured on UbuntuOn Ubuntu 22.04, for the sake of Waydroid, I gave Wayland a try. Without knowledge of the root causes of the following issues, I'd just hold on for a while before switching. <div><br /></div><div><ol style="text-align: left;"><li>Chrome/VS Code fonts are blurry, once display scaling is enabled. </li><li>Chrome and Prospect Mail blink often during rendering. </li><li>Laggy mouse/windows dragging sometimes.
</li></ol><div>Is it caused by Nvidia GPU compatibility? </div></div>Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-13364612708823470582022-05-01T22:05:00.000+08:002022-05-01T22:05:05.144+08:00Ubuntu tools to use outlook1. Evolution needs ews plugin installed to use outlook.com emails for enterprises
2. https://github.com/abraunegg/onedrive, deb installed from Suse build repo works great.Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-53350118239508302472022-04-25T14:52:00.002+08:002022-04-25T14:52:22.435+08:00Ubuntu and Bluetooth CallHere is a note for Ubuntu install. Bluetooth A2DP and HDP modes were always messed up by default, i.e., I can't really use Bluetooth microphone to make teams/zoom call. Seems replacing PulseAudio with Pipewire/wireplumber solve the problem smoothly. <a href="https://ubuntuhandbook.org/index.php/2022/04/pipewire-replace-pulseaudio-ubuntu-2204/">Refer to here.</a>Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-45776343801787702122022-03-27T20:01:00.003+08:002022-03-27T20:02:32.007+08:00Ludashi scoresDidn't know Huawei Mate30 is so powerful, almost same with Lenovo AMD 5600G Desktop.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHABl5Zj6Jo5UhtgnrG1r8mhDFlQSnnB0jj9S7tc-Y7XDdcjZftztD2Nz9eZ9vNe0i9elY46lJlxyAq_axriqh3zjJu0Et6rLUiLSuE9Tlkcdglsm5_cZrbu4T_iQRpJKcLsgKPofolIc5gEvYpHqzSnmEeS9n4_VcpH_L1Di-ugSkW433Sg/s1396/1.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="600" data-original-height="883" data-original-width="1396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHABl5Zj6Jo5UhtgnrG1r8mhDFlQSnnB0jj9S7tc-Y7XDdcjZftztD2Nz9eZ9vNe0i9elY46lJlxyAq_axriqh3zjJu0Et6rLUiLSuE9Tlkcdglsm5_cZrbu4T_iQRpJKcLsgKPofolIc5gEvYpHqzSnmEeS9n4_VcpH_L1Di-ugSkW433Sg/s400/1.png"/></a></div>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo3aRMtgk9RqfDssFCmaELzj2-5sackRfdcwWqVJcJ8tvWnNS7xGx7iilG7V0tJgEJxvnDSIchVYT_3Tn52UcVdc2Sec2K6Q3HZluu6RdpSTpHHXronQcBsiMBo7nIZyWlbKnraF5NYlmaZQ5D7gWgAKpVg3DEKSjMdY36yncymrFVMpnAwA/s1177/1.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="600" data-original-height="856" data-original-width="1177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo3aRMtgk9RqfDssFCmaELzj2-5sackRfdcwWqVJcJ8tvWnNS7xGx7iilG7V0tJgEJxvnDSIchVYT_3Tn52UcVdc2Sec2K6Q3HZluu6RdpSTpHHXronQcBsiMBo7nIZyWlbKnraF5NYlmaZQ5D7gWgAKpVg3DEKSjMdY36yncymrFVMpnAwA/s600/1.png"/></a></div>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin26kQyV94dk4QuydTlARvqlmfcMU97Rt1zY_jjdh5CS6BYEoiVERnDqdYNfDUSODyGl8MkTOMkCDut_XL6ePw0GT1Qz3aNE2bl1Sa3gBoh1L9oWNKvKlu95znoJjqhiNRZRzhMPog9tJKlSg-dkflVqJXjY3cZx9XRBTE89jYq_SkpsTc6Q/s1155/1.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="600" data-original-height="732" data-original-width="1155" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEin26kQyV94dk4QuydTlARvqlmfcMU97Rt1zY_jjdh5CS6BYEoiVERnDqdYNfDUSODyGl8MkTOMkCDut_XL6ePw0GT1Qz3aNE2bl1Sa3gBoh1L9oWNKvKlu95znoJjqhiNRZRzhMPog9tJKlSg-dkflVqJXjY3cZx9XRBTE89jYq_SkpsTc6Q/s600/1.png"/></a></div>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4qOM_8LH26ozsrIZBmloAn8e-FVMaaDxtbHMeY7VqnC4d3hYyXb5mOJzkcYlwb-AUaH2VKAL7u81X268qx7rWSKCX0iZBYyTXNRY1Ok-oDNcKs8Koa0lbNI75LObu_x8nwIk0hgxUNfhKob5wUwpKYf62z0wMikVG40Y4AQbUxa6J-3u2Vw/s1040/1.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="600" data-original-height="447" data-original-width="1040" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4qOM_8LH26ozsrIZBmloAn8e-FVMaaDxtbHMeY7VqnC4d3hYyXb5mOJzkcYlwb-AUaH2VKAL7u81X268qx7rWSKCX0iZBYyTXNRY1Ok-oDNcKs8Koa0lbNI75LObu_x8nwIk0hgxUNfhKob5wUwpKYf62z0wMikVG40Y4AQbUxa6J-3u2Vw/s600/1.png"/></a></div>
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxANMLzLNTVoEq_PVR7kWy4g-PqvX0Cut7nxnncEQeBHkCY5BbMYk965EwY2_D9MA7w5NCN_ynT6TvhIQMiL2R5V2PjX1nwIWeUw6gfETdGiyot7W024l_WosHNYrGrGrQ-xJupBJJF2WStdFA8n82ELtya7FS-8WgvUU3v1OTZd9SYGtmHQ/s1035/1.png" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="600" data-original-height="409" data-original-width="1035" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxANMLzLNTVoEq_PVR7kWy4g-PqvX0Cut7nxnncEQeBHkCY5BbMYk965EwY2_D9MA7w5NCN_ynT6TvhIQMiL2R5V2PjX1nwIWeUw6gfETdGiyot7W024l_WosHNYrGrGrQ-xJupBJJF2WStdFA8n82ELtya7FS-8WgvUU3v1OTZd9SYGtmHQ/s600/1.png"/></a></div>Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-68735814629257926942022-03-13T07:59:00.005+08:002022-03-13T20:47:14.533+08:00Slow Ubuntu Bootup Troubleshooting<p>To analyze the reasons slowing down Ubuntu bootup, please use systemd-analyze cmd. </p>
<code>systemd-analyze time</code><br />
<code>Startup finished in 5.027s (kernel) + 11.220s (userspace) = 16.247s</code><br />
<code>graphical.target reached after 11.194s in userspace</code><br />
To sort modules by time taken during boot, use<br />
<code>systemd-analyze blame</code><br />
We can see snap modules took quite long to load. But snap are loading in parallel and doesn't block others. We can see critical path:<br />
<code>systemd-analyze critical-chain</code><br>
<code>graphical.target @11.194s</code><br />
For me, removing a USB card reader helps, due to BIOS/UEFI?<br />
Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-63988371555718147832021-01-13T14:27:00.004+08:002021-01-13T14:31:01.915+08:00docker compose to remote host<div># setup</div><div>ssh -nNT -L /tmp/socket.remote:/var/run/docker.sock user@remote.example.com &</div><div>export TUNNEL_PID=$!</div><div>export DOCKER_HOST=unix:///tmp/socket.remote</div><div><br /></div><div># use docker, docker-compose here</div><div>docker-compose…</div><div><br /></div><div><br /></div><div># shutdown and cleanup of the socket</div><div>kill $TUNNEL_PID</div><div>rm -f /tmp/socket.remote</div>Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-12292702088629394802021-01-13T11:28:00.001+08:002021-01-13T11:28:49.424+08:00CLI tool to manage Ubuntu networkSeems Ubuntu@WSL2 has problem on DNS. I need to use nmtui to manual configure DNS server time to time.
<div class="separator" style="clear: both;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj547inPrl_uQ3B86O69sgdmoMlxA3GzmH5RCmaA5x9n7sYk3bOug8fjSVkyW5mYyjf2cu4FKpcaZCOrwNfnNd6yYi0nR57L2zUKYw-Q4av2iF7CThLJ7XDL3zzy6A7zN-wpqan/s919/Capture.PNG" style="display: block; padding: 1em 0; text-align: center; "><img alt="" border="0" width="320" data-original-height="735" data-original-width="919" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj547inPrl_uQ3B86O69sgdmoMlxA3GzmH5RCmaA5x9n7sYk3bOug8fjSVkyW5mYyjf2cu4FKpcaZCOrwNfnNd6yYi0nR57L2zUKYw-Q4av2iF7CThLJ7XDL3zzy6A7zN-wpqan/s320/Capture.PNG"/></a></div>Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-77443808456211131602020-10-28T15:11:00.003+08:002020-10-28T15:11:48.580+08:00Run snap in WSL2To use snap in WSL2, we need systemd enabled, following instruction at
https://github.com/diddledan/ubuntu-wsl2-systemd-script/. However after enabling
systemd using the script, visual studio code can't open terminal anymore. There
will be a fix. Before you receive the fix, there is a workaround, to change the
last several lines of to:
<code>
<br/>
else
<br/>
exec /usr/bin/nsenter -t "$SYSTEMD_PID" -a /bin/login -p -f "$SUDO_USER"
<br/>
fi
<br/>
</code>
My MobaXterm also can't open WSL session. Not sure whether it is caused by above scripts. A workaround is to change default shell to cmd/powershell and run bash from there.
To run GUI apps from WSL, we could use vcxsrv/x410 or MobaXterm. vcxsrv is more bugful though. Due to WSL is using different network interfaces, we can set DISPLAY by adding the line to ~/.bashrc:
<code>
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
</code>
Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-88428204486285257072020-09-02T09:13:00.000+08:002020-09-02T09:13:12.035+08:00New Xiaomi Moann Inkpad XInkpad X was released it's new e-ink reader Inkpad X at July, 2020. The specs
listed is:
<div class="separator" style="clear: both;">
<a
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVGQQQuIXTXAdgHypPTjNxNBoxrNOc9F-xBn2hh8jGU1PkC4V7nefNtNNGNxbw6tuLUby3kELY0cdiIKD_132IL0Wt96y2c277KXVk6-z2syGeffjj6D52dAtX9VaI4kUb_T19/s0/45498e0d798fa5d6de7e550919b1a912.jpg"
style="display: block; padding: 1em 0; text-align: center;"
><img
alt=""
border="0"
data-original-height="2349"
data-original-width="790"
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVGQQQuIXTXAdgHypPTjNxNBoxrNOc9F-xBn2hh8jGU1PkC4V7nefNtNNGNxbw6tuLUby3kELY0cdiIKD_132IL0Wt96y2c277KXVk6-z2syGeffjj6D52dAtX9VaI4kUb_T19/s0/45498e0d798fa5d6de7e550919b1a912.jpg"
/></a>
</div>
It costs me RMB 1699 (340 SGD) to buy from Taobao on 7, Aug. Due to Covid-19,
air shipment is unavailable to ship to Singapore and sea shipment took three
weeks with higher costs (due to GST tax). Inkpad X features a large 10 inch
e-ink screen with 1600x1200, which is not unpar with Kindle technically. But be
honest, I can't differentiate it much from 50cm away, my usual reading distance.
Quite satisfied with the overall building quality and its powerhouse rendering
books, especially its PDF handling much better than Kindle Oasis. For Android
8.1 under-hood, it theoretically supports almost all apps. But after two days
use, I resisted attractions to use them and here you go some tips to make it a
better tool for you, who just want to indulge yourself in reading.
<ul>
<li>Use Calibre</li>
<li>Install Koreader</li>
<li>Solve Problems</li>
</ul>
For whom would read a lot of PDF, there are obvious reasons to follow these tips
for you. Before showing the evidences, let's have a look at Inkpad X default UI.
After unboxing it, you could see the default calendar ScreenSaver, and Inkpad X
provides a very convenient scheduler app. Unfortunately, the events added in
scheduler won't appear in ScreenSaver. Good news is Inkpad X allows to change
ScreenSaver.
<div class="separator" style="clear: both;">
<a
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUObQm_7DCK_zVsqLGHPcoatuyjnE861rctXZHGEVZqcNz3GKA_N97xvJemMa2YOSj9_iSaVCOh-jH7p5FhcbFmQ_eh-ZCCdyRL99N5NPmej0AFRHW9zxFjqTPxCRqtYLbQmjM/s1457/Screenshot_20200902-075046.png"
style="display: block; padding: 1em 0; text-align: center;"
><img
alt=""
border="0"
width="400"
data-original-height="893"
data-original-width="1457"
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUObQm_7DCK_zVsqLGHPcoatuyjnE861rctXZHGEVZqcNz3GKA_N97xvJemMa2YOSj9_iSaVCOh-jH7p5FhcbFmQ_eh-ZCCdyRL99N5NPmej0AFRHW9zxFjqTPxCRqtYLbQmjM/s400/Screenshot_20200902-075046.png"
/></a>
</div>
Pressing the beautiful red button on top of Inkpad X would bring you to its
default UI, with four items in left menu:
<ul>
<li>Reading (this is to use DuoKan, the default reading app for Inkpad X)</li>
<li>Scheduler</li>
<li>
Applications, listing all apps installed. I loaded Wechat Reader, Kindle,
Overdrive to borrow NLB library books, KOReader. Please be noted the
floating ball app I enabled to make navigation handy.
</li>
<li>Settings</li>
</ul>
The floating ball was used to take all screenshots here. All the screenshots are
colorful, including DuoKan's reading interface, except for Koreader's. This is
the first reason I recommend not using DuoKan when reading PDF. I guess Koreader
pre-processed the PDF to greyscale and rendered better graphic effects comparing
with DuoKan, side by side. Second reason is Koreader's PDF rendering is much
faster.
<div class="separator" style="clear: both;">
<a
href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzLEQcqqI9YWqu10ReozNwTZU-Zc1C0BgQdswS_PoB7diNyQ-tPPBVsJlR91w_VMTnegWKahXdH41PtN7-f1nL79mMBx03eGx7VnmQS4-YA2yQZ2P_2gyqMRqOPVjwyz4bMfSo/s1556/Screenshot_20200902-075046.png"
style="display: block; padding: 1em 0; text-align: center;"
><img
alt=""
border="0"
width="600"
data-original-height="1096"
data-original-width="1556"
src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzLEQcqqI9YWqu10ReozNwTZU-Zc1C0BgQdswS_PoB7diNyQ-tPPBVsJlR91w_VMTnegWKahXdH41PtN7-f1nL79mMBx03eGx7VnmQS4-YA2yQZ2P_2gyqMRqOPVjwyz4bMfSo/s600/Screenshot_20200902-075046.png"
/></a>
</div>
DuoKan seems able to scan at backend to pickup books copied to Books directory
when you connect Inkpad X to Windows PC. However, it didn't list all the books
copied, while Koreader recoganized all of them except for AZW3 format. So I
converted all AZW3 to Mobi so make Koreader to list all. This is the 3rd reason
I don't like DuoKan for its weaker format support or whatever reason not listing
copied books. A very different between Koreader and DuoKan/Kindle is the
organization of books. Koreader does not reorganize books according to metadata
in categories, instead, it just displays the books as how they are saved in file
system structure. This sounds a bad thing especially when the books are not well
organized before hand. Calibre saved my day and make it even better with its
customizable file system structure when copying books into devices based on
embedded metadata. I tend to use Inkpad as pure reader and not use other apps or
take notes on it, which could be killer app for many though. For my kids,
dictionary is the key to learn. But Koreader v2020.08.1 dictionary does not work
out of box. After
<a href="https://github.com/koreader/koreader/issues/6614"
>asking Koreader's developers</a
>, it's a bug causing downloaded dictionary uncompressed. The solution working
for me is to uncompress the dictionary downloaded at koreader/data/dict. Now my
kids are happy.
Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-57573217121510630242019-05-07T12:27:00.001+08:002019-05-07T12:48:15.614+08:00AMD emulator on Hyper-VAMD CPU based Android emulator is working according to <a href="https://android-developers.googleblog.com/2018/07/android-emulator-amd-processor-hyper-v.html">the blog</a>. However, when I tried it with Android Studio 3.4, it kept crashing with error messages like:<br />
<br />
Android\android-sdk\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: WHPX: Failed to exec a virtual processor<br />
<br />
Luckily, after my Windows was upgraded to insider preview version 18890.1000, the emulator is working now. And it's a surprise to be much faster than emulator on my old i7 CPU.<br />
<br />
<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6W8bSidiNkyBT7kYSuwDbyeyq2U-Bb3R_2RHbKuvNTCRuOl6dZGE5FgrWrL54MVwneJMGT73Tzv0m9k0LpDQDicI_LcrLTDuLeiTbLfhfvi671BAb4uy6cukwOR5xh_-PH10c/s1600/battery.png" imageanchor="1" ><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi6W8bSidiNkyBT7kYSuwDbyeyq2U-Bb3R_2RHbKuvNTCRuOl6dZGE5FgrWrL54MVwneJMGT73Tzv0m9k0LpDQDicI_LcrLTDuLeiTbLfhfvi671BAb4uy6cukwOR5xh_-PH10c/s1600/battery.png" data-original-width="580" data-original-height="323" /></a><br />
<br />
Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-6644884168467263392019-03-30T22:19:00.001+08:002019-03-30T22:19:30.910+08:00Visual Studio Xaramin debug with BluestacksGot a AMD Lenovo A485 with Windows 10 Home, which does not have Hyper-V. To use it for Visual Studio Xamarin experiments, I want a native Android emulator. Although it can install AMD native Android emulator, with hypervisor windows platform enabled, it does not allow other VMs to be installed, e.g., using Virtualbox. Luckily, Android VMs on Virtualbox or VMWare with TCP/IP based remote ADB support are able to act as Emulator. Bluestacks is another choice.<br />
<br />
<br />
<ul>
<li>Install bluestacks</li>
<li>Enable ADB in bluestacks, this will open 5555 port to connect from Visual Studio</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkj3Gf3sTuXKykSYD1m56kJbUlnglq5gDR3IepuorvYi1YeXmAPkyWsdDa0_bHa6MvXp_vpHaL9I_hJbfSnIKNbHPJeLbYTlR9FXKdxd5ldjQ6bHhkJ-jfO2UpGIa6kgayGHG4SQ/s1600/bluestackADB.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="713" data-original-width="1039" height="219" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkj3Gf3sTuXKykSYD1m56kJbUlnglq5gDR3IepuorvYi1YeXmAPkyWsdDa0_bHa6MvXp_vpHaL9I_hJbfSnIKNbHPJeLbYTlR9FXKdxd5ldjQ6bHhkJ-jfO2UpGIa6kgayGHG4SQ/s320/bluestackADB.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div>
<ul>
<li>Goto Android install directory/android-sdk/platform-tools, run</li>
</ul>
<div style="text-align: center;">
adb connect localhost:5555</div>
</div>
<div style="text-align: center;">
<ul>
<li style="text-align: left;">For Visual Studio Xamarin Android project, you then could find a new Android device to deploy to.</li>
</ul>
<div style="text-align: left;">
<br /></div>
</div>
<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/16434015301982060721noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-72492484584519822012017-01-09T11:14:00.001+08:002017-01-09T11:14:40.627+08:00BPMN and ActivitiA quick guide: http://www.nurkiewicz.com/2011/01/activiti-processes-and-executions.html<br />
<br />
BPMN is easy to be transformed to petri net for formal analysis.Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-76612587218407126262016-04-23T08:25:00.004+08:002016-04-23T08:25:49.871+08:00Fix HDMI audio for ubuntu/NUCMy NUC is hooked to Philips 221E via HDMI cable. The audio is fine if the monitor is never turned off. Once the monitor reboots, the distorted audio really make it unusable.<br />
<br />
To solve the problem at ubuntu, append 'tsched=0' to 'load-module module-udev-detect' at /etc/pulse/default.paAnonymoushttp://www.blogger.com/profile/16434015301982060721noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-48653724042055432932014-08-27T15:53:00.002+08:002014-08-27T15:56:25.219+08:00How to add extra dir to CLASSPATH at spring-bootSpring-boot has <a href="http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#executable-jar-launching">three built-in launchers</a> as real main classes, JarLauncher, WarLauncher and PropertiesLauncher, which could be used to call executable. These launchers set the path to load resources and classes.<br />
Only PropertiesLauncher could be use dir outside the jar file. To add an extra dir 'EXTRA' to classpath:<br />
1. for maven, add the following fragment<br />
<plugin><br />
<groupId>org.springframework.boot</groupId><br />
<artifactId>spring-boot-maven-plugin</artifactId><br />
<configuration><br />
<layout>ZIP</layout><br />
</configuration><br />
</plugin><br />
2. Use loader.path when execute the jar<br />
java -Dloader.path="lib/,config/,EXTRA/" -jar the.jar<br />
<br />
Then, for example, ClassPathResource("1.properties") could get 1.properties from EXTRA dir.Anonymoushttp://www.blogger.com/profile/16434015301982060721noreply@blogger.com1tag:blogger.com,1999:blog-7982884.post-9839420575529185932014-04-03T14:23:00.000+08:002014-04-03T14:23:29.471+08:00Lost 3 yearsI forgot to migrate my wordpress DB from an expired hosting plan, and the posts from 2001-2004 are lost.<br />
<br />
But, well, one word could cover most of the life: babysitter.Anonymoushttp://www.blogger.com/profile/16434015301982060721noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-49257030313465556232011-02-01T15:48:00.005+08:002011-02-01T15:57:58.756+08:00Lens droppedVisited universal studio yesterday, a wonderful place.
<br/>
But, unlucky, my wife lost the lens cap; 1 hour later, the 17-55 lens got dropped, and UV glass is broken, the UV ring is dented.
By quicky googling, I found guys spent hours to DIY remove the dented UV.
<br/>
So, I gave up the chance to do it myself, instead, it's sent to canon service centre today. They helped me to remove the dented UV in 15mins, even gave me a free lens cap.
<br/>
Huh, the service is great, thanks.Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-81437743570833014642010-06-25T11:25:00.002+08:002010-06-25T11:46:51.816+08:00update from redhat RHEL4 to CentOS5.5I have a virtual machine running RHEL4 on our cluster server. But IT does not support it anymore. So, I tried to update it to CentOS to enjoy update.
<br/>
The problem is I have no physical access to the VM, so need to update online.
<br/>
Neither Redhat nor CentOS suggest to do online update between major releases, but no choice. I did in 2 steps:
<div><ol><li>migrate from RHEL4 to CentOS4</li><li>update from CentOS4 to CentOS5</li></ol><div>
<br/>
Step1 works like charm, but the 2nd step is nightmare. I followed this article: http://planet.admon.org/howto/update-centos-4-to-centos-5-remotely/ because it is the longest one I found. :D I guess it is more comprehensive.</div></div><div>
</div><div>all the steps before 'yum upgrade' is OK, but yum upgrade tried to dump mega error messages (e.g., matchpathcon /.../... failed invalid argument) to my remote terminal, and lasted for more than 10mins, util I pressed ctl+c. Then it left a messy system to me.</div><div>
</div><div>What I tried to fix the issue:</div><div><ol><li>package-cleanup --leaves (then manually yum remove the packages)</li><li>package-cleanup --cleandupes</li><li>yum upgrade (run several times with removing of conflict reported)</li></ol><div>Now, the system seems normal. </div></div>Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com1tag:blogger.com,1999:blog-7982884.post-41925733602675662472010-06-12T13:25:00.000+08:002010-06-12T13:26:06.145+08:00learning to crawlTiantian's 5mth+12days already.
<br/>
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/MaQSFjHwr-8&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/MaQSFjHwr-8&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-55578393672855422842010-06-03T08:50:00.001+08:002010-06-03T08:54:01.692+08:00Drunk sonHuh, he just finished a whole bottle of milk.
<br/>
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/FynHHzvpqaI&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/FynHHzvpqaI&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-34036494380225450372009-12-10T14:38:00.005+08:002010-01-12T16:24:35.349+08:00HOWTO: when you lost DPP CDI cannot find my canon DPP install CD, and Canon website provides DPP updater only.
<br/>
DPP updater runs only on PC with DPP installed. If you have the following contents at registry table, then it thinks you have DPP installed.
<br/><br/>
Windows Registry Editor Version 5.00<br/>
[HKEY_LOCAL_MACHINE\SOFTWARE\Canon\DPP]<br/>
[HKEY_LOCAL_MACHINE\SOFTWARE\Canon\ZoomBrowser EX\]<br/>
[HKEY_LOCAL_MACHINE\SOFTWARE\Canon\EOS Capture]<br/>
[HKEY_LOCAL_MACHINE\SOFTWARE\Canon\EOSViewerUtility]<br/>
[HKEY_LOCAL_MACHINE\SOFTWARE\Canon\PhotoStitch]<br/><br/><br/>
Some lines are for other updater.
<br/><br/>
For ZoomBrowser 6.3+, please change "ZoomBrowser EX" to "ZoomBrowser EX\Install".Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-12326337329866905322009-12-09T10:38:00.003+08:002009-12-09T10:40:04.783+08:00Google wave invitation to sendWho want to try the wave? I have couples of invitations, please leave your email, if you want one.
<br/>
Leave anonymous comments, then, your email won't be displayed.Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0tag:blogger.com,1999:blog-7982884.post-87794360169378677502009-06-22T16:20:00.003+08:002009-06-22T16:32:17.748+08:00B超对照表copied from
http://blog.sina.com.cn/s/blog_4ae0fa1d0100b3ex.html~type=v5_one&label=rela_nextarticle
http://blog.sina.com.cn/s/blog_4ae0fa1d0100b3f5.html~type=v5_one&label=rela_nextarticle
<ul><li>怀孕: Pregnancy</li><li>预产期: Date of delivery; Due date</li><li>害喜: Morning sickness</li><li>胎儿心音: Fetal Heart Sounds</li><li>破水: Membrane Rupture / Water broken</li><li>阵痛: Labor Pain</li><li>早期破水: Premature Rupture</li><li>腿抽筋: Leg Cramp</li><li>胎儿: Fetus</li><li>胎动: Fetal Movement; Quickening</li><li>妊娠纹: Striations of Pregnancy (common saying: strech mark)</li><li>羊水过多: Polyhydramnion</li><li>产道: Birth Canal</li><li>阴道检查: Internal (Vaginal) Examination</li><li>分娩: Delivery</li><li>子宫收缩: Contraction</li><li>子宫收缩: Contraction</li><li>会阴切开: Episiotomy</li><li>会阴缝合: Perineorrhaphy Stitch</li><li>产后: After Birth</li><li>脐带: Umbilical Cord</li><li>胎盘: Placenta</li><li>恶露: Lochia</li><li>早产: Premature Birth</li><li>胎盘前置: Placenta Praevia</li><li>胎盘分离: Separation of the Placenta</li><li>盘卷脐带: Coiling of the Umbilical Cord</li><li>骨盆狭窄: Narrow Pelvic</li><li>会阴裂伤: Laceration of the Perineum</li><li>子宫破裂: Tubal Rupture</li><li>产褥热: Puerperal Fever</li><li>剖腹产: Caesarean Section</li><li>产钳助产: Forceps Delivery</li><li>母乳喂养: Brest Feeding</li><li>人工喂养: Bottle Feeding</li><li>初乳: Colostrum</li><li>新生儿: Newborn Baby</li><li>见红:The bloody show</li><li>肚脐:belly button</li><li>臂位:breech position</li><li>B超:ultrasound</li><li>宫高:fundal height</li><li>羊水:amniotic fluid</li><li>孕周:gestational weeks</li><li>足月妊娠:term</li><li>骨盆:pelvis</li><li>产程发动:onset of labor</li><li>先兆临产:threatened labor</li><li>产程:parturient</li><li>初产妇:primipara</li><li>胎位:fetal position</li><li>宫缩:uterine contraction</li><li>宫内生长迟缓:intrauterine growth retardation (IUGR)</li><li>小于胎龄:small for gestational age (SGA)</li><li>大于胎龄:large for gestational age (LGA)</li><li>巨大儿:macrosomia</li><li>过期妊娠:prolonged pregancy</li><li>过期:overdue (postdate)</li><li>过熟postmaturity</li><li>胎儿窘迫fetal distress</li><li>胎心过缓fetal bradycardia</li><li>胎心过速fetal tachycardia</li><li>胎心心律不齐fetal heart irrythmia</li><li>羊水粪染meconium-staining amniotic fluid</li><li>会阴切开术episiotomy</li><li>GS—胎囊</li><li>FE—胎芽:早期胎儿</li><li>CRL—头臀长:为胎儿头与臀之间的距离,表示胎体纵轴平行测量最大的长轴,主要用于判定孕7~12周的胎龄。</li><li>FH—胎头:轮廓完整为正常,缺损、变形为异常,脑中线无移位和无脑积水为正常。</li><li>BDP—胎头双顶径:胎儿头部左右两侧之间最宽部位的长度,又称为“头部大横径”。孕足月时应达到9.3厘米或以上。按一般规律,在孕5个月以后,基本与怀孕月份相符,也就是说,妊娠28周(7个月)时BPD约为7.0厘米,孕32周(8个月)时约为8.0厘米,以此类推。孕8个月以后,平均每周增长约为 0.2厘米为正常。当初期无法通过CRL来确定预产日时,往往通过BPD来预测;中期以后,在推定胎儿体重时,往往也需要测量该数据。</li><li> APTD —— 腹部前后间的厚度,又称为“腹部前后径”。在检查胎儿腹部的发育状况以及推定胎儿体重时,需要测量该数据。</li><li>H—胎心:B超于怀孕7-8周、最早孕6周末可见胎心跳动。胎心跳动的频率正常为每分钟120-160次之间。</li><li>FL—股骨长度:是胎儿大腿骨的长度,又称为“大腿骨长、股骨长”。指胎儿大腿根部到膝部间股骨的长度。它的正常值与相应的怀孕月份的BPD值差2-3厘米左右,比如说BPD为9.3厘米,股骨长度应为7.3厘米;BPD为8.9厘米,股骨长度应为6.9厘米等。一般在妊娠20周左右,通过测量FL来检查胎儿的发育状况</li><li>SP—脊椎:孕12周后可见胎儿脊柱,孕20 周则清晰可辨。胎儿脊柱连续为正常,缺损为异常,可能脊柱有畸形。</li><li>FM—胎动:B超于孕8~9周就可见到胎动。有、强为正常,无、弱可能胎儿在睡眠中,也可能为异常情况,要结合其他项目综合分析。</li><li>Cord—脐带:正常情况下,脐带应漂浮在羊水中,如在胎儿颈部见到脐带影像,可能为脐带绕颈。</li><li>PL—胎盘:位置是说明胎盘在子宫壁的位置;正常足月胎盘的厚度应在2.5-5厘米之间。</li><li>GP ( 胎盘分级):一般胎盘分为0,I ,II,III级。Ⅰ级为胎盘成熟的早期阶段,回声均匀,在怀30-32周可见到此种变化;Ⅱ级表示胎盘接近成熟;Ⅲ级提示胎盘已经成熟,胎盘内有很多钙化点,表现为小砂粒状,一般不对胎儿生命构成威胁,但应引起重视。越接近足月,胎盘越成熟,回声的不均匀。</li><li>AC —— 腹围</li><li>AMN—羊水:</li><li> MVP( 最大羊水池垂直羊水深度)在3-7厘米之间为正常,超过7厘米为羊水增多,少于3厘米为羊水减少。</li><li> AFI ( 羊水指数)以孕妇的脐部为中心,分上,下,左,右4区域,将4个区域的羊水深度相加,就得到羊水指数,孕晚期羊水指数的正常值是8~18厘米。超过18厘米为羊水增多,少于8厘米为羊水减少。AFI在判断羊水多少方面更科学一些。</li><li> S/D (A/D)— 胎儿脐动脉收缩压与舒张压的比值与胎儿供血相关,当胎盘功能不良或脐带异常时此比值会出现异常,在正常妊娠情况下,随孕周增加胎儿需要增加S下降,D升高,使比值下降,近足月妊娠时S/D小于3。</li><li>胎儿B超单常见缩写还有</li><li>TCD: 小脑横径</li><li>HL —— 肱骨长</li><li>HC: 头围</li><li>FTH: 胎儿腿部皮下脂肪厚度</li><li>LOA ,ROA,LOP,ROP;LSA,RSA等——表示胎位的英文缩写。L=Left 左,R=Right 右,A=Anterior 前,P=Posterior 后,O=Occiput 枕骨,S=Sacrum 骶骨,SC=Scapula 肩。表示胎位,如:左枕前(LOA) 左枕横(LOT) 左枕后(LOP) 右枕前(ROA) 左骶前(LSA)右骶前(RSA)等。</li><li> 胎儿体重的估算值Y(g)公式如下:</li><li> 公式1: Y=-4973.72+260.69HC</li><li> 公式2: Y=-2686.60+171.48AC</li><li> 公式3: Y=-2232.56+747.42FL</li><li> 公式4: Y=-2513.51+1049.90FTH</li><li> 公式5: Y=-5168.32+100.97HC+110.86AC+143.09FL+331.43FTH</li><li> 可以使用其中任一个公式计算,公式5的精度最高</li></ul>Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com1tag:blogger.com,1999:blog-7982884.post-15946895384538291762008-11-12T17:06:00.005+08:002008-11-14T10:31:01.402+08:00Develop Browser Plugin based on Windows Mobile<p>NPAPI is supported by various Web browser engines, such as WebKit and Gecko. Iris browser is a WebKit based Web browser that can run on Windows Mobile. So, we could extend Iris with NPAPI plugin.
</p><p>
I am not sure whether Iris provide develop environment for plugin. We might need to find another way to build plugin.</p>
<p>What I tried first is to build minimo, and study whether can build plugins based on minimo. Unfortunately, seems minimo does not support plugins well. Anyway, I write down my experiment for reference.</p>
<ul style="font-weight: bold;"><li><span style="font-size:130%;">Build minimo</span></li></ul>minimo is the minisized Mozilla running on Windows Mobile, and I guess it is a good start point to build plugin, as all its codes are available. http://www-archive.mozilla.org/projects/minimo/WinCE/build.html gives the steps to build minimo. Here, just add some points:
<ol><li>I met the problem@http://forums.mozillazine.org/viewtopic.php?f=47&t=553405, solved by adding one line ac_cv_static_assertion_macros_work=yes before the line of "if eval "test \"`echo '$''{'ac_cv_static_assertion_macros_work'+set}'`\" = set"; then".
I do not know the reason, and after it pass, and I revert the configure to original version, it still works
</li><li>on Windows Vista, \moztools\bin\nsinstall.exe requires administrator right, so, I run console by administrator to build.</li><li>Then I met another issue: <span style="display: inline;" id="summary_alias_container" class="bz_default_hidden"><span id="short_desc_nonedit_display">SEE_MASK_FLAG_DDEWAIT and SEE_MASK_INVOKEIDLIST undefined in nsOSHelperAppService.cpp, solved by using patch from https://bugzilla.mozilla.org/show_bug.cgi?id=402948</span></span></li></ol>It takes 1~2 hours on my DualCore 1.86G Dell Precision PWS390 to build minimo.
<ul style="font-weight: bold;"><li><span style="font-size:130%;">qtWebKit as plugin development SDK</span></li></ul>
<p>Although minimo runs smoothly on my emulator, but I found it does not support plugins (if I am wrong, let me know, tkz). qtWebKit is the Windows Mobile port of WebKit engine. It's the next candidate I tried. Please goto http://code.staikos.net/ for latest sources.</p>
<p>I download qtwebkit 4.5 from SVN repository http://svn.webkit.org/repository/webkit/trunk, version 37064. http://git.webvm.net/ provides npsimple, a simple plugin sample running on Windows Mobile.</p>
<p>I built npsimple with VS2008, after setting include directory in the project. Please make sure the directory setting contains those with npruntime.h and npfunctions.h. For the qtWebKit I downloaded, they are:</p><ol><li>WebCore\bridge</li><li>WebCore\plugins</li></ol>
<p>To try the plugin, I installed Iris browser based on WebKit to my Window Mobile emulator (WM5)(http://www.torchmobile.com/blog/?p=5), and then copy the built plugin to plugins folder under where I install Iris browser (http://www.torchmobile.com/blog/?p=9).</p>
<p>All done! Just open the html coming with npsimple project and see the result.</p>Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com1tag:blogger.com,1999:blog-7982884.post-46324811898082701612008-09-01T22:34:00.002+08:002008-09-01T23:31:54.494+08:00PdfEdit -- the strongest open source PDF editor.There is no budget for me to study into Acrobat's pdf editor in detail, so, I do not know whether PdfEdit is weaker or stronger than it.
<br/><br/>
But based on my experience, I just recommend PdfEdit as your pdf editor, especially if you do not bother do a little script programming.
<br/><br/>
Here, I give an example of how could you change all pages' size with PdfEdit.
<br/><br/>
Step1: goto 1st page, and decide the desire page size:
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh9BNcCk9xItV2YfuQqxQDA8m_izzMZEzda5UPrkFSHDvCm6hEXhIQ1T_fHu4PITSkXKaHdMng1B_26H7uNnJHjTMSMLcxrhP2zZTLp4zGjqVXkKCKwcwarGpsVlUfyy3IpaF2/s1600-h/1.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhh9BNcCk9xItV2YfuQqxQDA8m_izzMZEzda5UPrkFSHDvCm6hEXhIQ1T_fHu4PITSkXKaHdMng1B_26H7uNnJHjTMSMLcxrhP2zZTLp4zGjqVXkKCKwcwarGpsVlUfyy3IpaF2/s400/1.png" alt="" id="BLOGGER_PHOTO_ID_5241067807486386050" border="0" /></a> In this example, we change the left margin to 50, the effect on 1st page is:
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHEuzKayq9REnU14MULvcwm0UFdQSnauyQwPWDKAI0qkzJRc-T1CGXb-t-nQYL_PdCpNL9vmNYRyTs8oeu2j1WdHzPZVUahomww5Esd1hqxfSty-eClv5mJlYAaj0QCt1_Ez-1/s1600-h/1.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHEuzKayq9REnU14MULvcwm0UFdQSnauyQwPWDKAI0qkzJRc-T1CGXb-t-nQYL_PdCpNL9vmNYRyTs8oeu2j1WdHzPZVUahomww5Esd1hqxfSty-eClv5mJlYAaj0QCt1_Ez-1/s400/1.png" alt="" id="BLOGGER_PHOTO_ID_5241068565773865938" border="0" /></a><br/><br/>
Step2: goto 1st page again, if you want to change page 1-6's size to (50,0,595.2,841.92), then input the scripts to script window and press enter to execute it, that's all:
<br/><br/>
for(i=0;i<6;i++)
<br/><br/>
{<br/>
page().setMediabox(50,0,595.2,841.92);<br/>
PageSpace.nextPage();<br/>
}<br/>
page().setMediabox(50,0,595.2,841.92);<br/><br/>
For more samples of PdfEdit script, you can refer to .ps files in PdfEdit home dir, e.g., ubuntu install it to /usr/share/pdfedit/.<br/>
Detailed script API can be found at: http://pdfedit.petricek.net/appendix.htmlLi-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com1tag:blogger.com,1999:blog-7982884.post-1341554300328830322008-08-04T14:49:00.002+08:002008-08-04T15:09:49.584+08:00WinDbg theme<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv-2WezdK6BwViqcHjHNjeEpVv5bbZHC8iCmk2i6phSEqXB7jw_WKzmVXnQl52UipYrMaqsb-yrmDuyYhHXycQEJvc9rReOjtUuCS3DHVJEX3OwmQvYfHWIGoVNxo0IPcyv4jt/s1600-h/Untitled.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgv-2WezdK6BwViqcHjHNjeEpVv5bbZHC8iCmk2i6phSEqXB7jw_WKzmVXnQl52UipYrMaqsb-yrmDuyYhHXycQEJvc9rReOjtUuCS3DHVJEX3OwmQvYfHWIGoVNxo0IPcyv4jt/s400/Untitled.jpg" alt="" id="BLOGGER_PHOTO_ID_5230555900051068706" border="0" /></a>
I just follow <a href="http://blogs.msdn.com/tess/archive/2008/04/18/pimp-up-your-debugger-creating-a-custom-workspace-for-windbg-debugging.aspx">tess blog</a> to setup the windbg theme.
For reuse, the theme can be exported to windbg.reg (HKEY_CURRENT_USER\Software\Microsoft\Windbg\Workspaces), so that you can recover it easily.<code>
</code>Li-Zhao 李钊http://www.blogger.com/profile/08007907669125875950noreply@blogger.com0