In Ubuntu dock, to show applications in current workspace only, run the following command:
$ gsettings set org.gnome.shell.extensions.dash-to-dock isolate-workspaces true
References
Wednesday, October 30, 2019
Thursday, October 24, 2019
Running Springboot web app in IntelliJ Idea Community Edition
When you run your springboot application in IntelliJ idea Community Edition having the following error, you can try the solution below to solve the problem.
Error "Failed to introspect annotated methods on class org.springframework.boot.web.servlet.support.SpringBootServletInitializer"
If your "pom.xml" has dependency with "provided" scope, you may have trouble when running your application in IntelliJ Idea Community Edition.
Some suggests that you can change the scope from "provided" to "compile". Here is another solution for this issue:
In your "Run/Debug Configurations", check "Include dependencies with 'Provided' scope". Then you can run the application from IntelliJ Idea Community Edition.
Error "Failed to introspect annotated methods on class org.springframework.boot.web.servlet.support.SpringBootServletInitializer"
If your "pom.xml" has dependency with "provided" scope, you may have trouble when running your application in IntelliJ Idea Community Edition.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
Some suggests that you can change the scope from "provided" to "compile". Here is another solution for this issue:
In your "Run/Debug Configurations", check "Include dependencies with 'Provided' scope". Then you can run the application from IntelliJ Idea Community Edition.
Wednesday, October 2, 2019
Image bytes to np array in Python
For reference:
# data - image bytes
im = Image.open(BytesIO(data))
I = numpy.asarray(im)
print("I type:", type(I), "I shape:", I.shape)
>> I type: <class 'numpy.ndarray'> I shape: (512, 512, 3)
# data - image bytes
im = Image.open(BytesIO(data))
I = numpy.asarray(im)
print("I type:", type(I), "I shape:", I.shape)
>> I type: <class 'numpy.ndarray'> I shape: (512, 512, 3)
Friday, September 27, 2019
Slow Ubuntu startup time due to apt-daily.service
The apt-daily.service makes users feel very slow when running at startup. There is a workaround to delay its execution after system boot up:
Do the following:
sudo systemctl edit apt-daily.timer
And paste the config to the config file:
# apt-daily timer configuration override
[Timer]
OnBootSec=15min
OnUnitActiveSec=1d
AccuracySec=1h
RandomizedDelaySec=30min
References:
https://askubuntu.com/questions/800479/ubuntu-16-04-slow-boot-apt-daily-service
https://ubuntu-mate.community/t/shorten-boot-time-apt-daily-service/12297
Do the following:
sudo systemctl edit apt-daily.timer
And paste the config to the config file:
# apt-daily timer configuration override
[Timer]
OnBootSec=15min
OnUnitActiveSec=1d
AccuracySec=1h
RandomizedDelaySec=30min
References:
https://askubuntu.com/questions/800479/ubuntu-16-04-slow-boot-apt-daily-service
https://ubuntu-mate.community/t/shorten-boot-time-apt-daily-service/12297
Thursday, September 19, 2019
Android Emulator 29.2.0 problem with Ubuntu 19.04
It just crashed with segmentation fault.
From https://androidstudio.googleblog.com/2019/09/emulator-2920-stable.html, the OS may crashes with incompatible Vulkan drivers.
Temporary rollback to emulator 29.1.12-5839083 as a workaround.
Tuesday, September 3, 2019
Adjust VirtualBox VMS BIOS time
Syntax
VBoxManage modifyvm "VMS Name" --biossystemtimeoffset -ms
Note:
ms - milliseconds
For example
VBoxManage modifyvm "VMS Name" --biossystemtimeoffset -86400000
Wednesday, July 31, 2019
Kalman filter
Just finding some resources for learning about Kalman filter, seems it is a very useful technique which applicable on a lot of different areas.
References:
https://blog.maddevs.io/reduce-gps-data-error-on-android-with-kalman-filter-and-accelerometer-43594faed19c
References:
https://blog.maddevs.io/reduce-gps-data-error-on-android-with-kalman-filter-and-accelerometer-43594faed19c
Friday, July 19, 2019
Conflict between pandas 0.25.0 and pandas-datareader 0.7.0
For Python users, there is a conflict between "pandas 0.25.0" and "pandas-datareader 0.7.0".
If you do an "from pandas_datareader import data", you will got a conflict:
"ImportError: cannot import name StringIO from pandas.compat"
To get rid of this issue, use "pandas 0.24.2" + "pandas-datareader 0.7.0" instead.
If you do an "from pandas_datareader import data", you will got a conflict:
"ImportError: cannot import name StringIO from pandas.compat"
To get rid of this issue, use "pandas 0.24.2" + "pandas-datareader 0.7.0" instead.
Wednesday, May 8, 2019
Linux mounted NTFS partition as read-only suddenly
Sometimes in dual boot system (Windows / Linux), the NTFS partitions might have some problem causing the Linux mounted the NTFS partitions as read-only. To solve this problem, one might try following to see if it works:
Step 2: Run ntfsfix on the target partition
If the command is successful, the following output should be shown:
Step 1: Unmount the partition first
This can be done via Disks application OR command line:
- e.g. umount -v /dev/sda1
Step 2: Run ntfsfix on the target partition
- e.g. sudo ntfsfix /dev/sda1
If the command is successful, the following output should be shown:
Mounting volume... The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
FAILED
Attempting to correct errors...
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sda1 was processed successfully.
Step 3: Remount the partition
The partition should be read-write enabled
Step 3: Remount the partition
The partition should be read-write enabled
Tuesday, January 8, 2019
NFC notes on NDEF message for URL
Just a note for encoding URL in NDEF message, the NDEF record should user TNF_WELL_KNOWN as its TNF. And NDEF record type should be RTD_URI. And the first byte could be encoded for different protocols (e.g. 0x01 = "http://www", 0x02 = "https://www", etc.
References:
Beginning NFC
Professional NFC Application Development for Android
References:
Beginning NFC
Professional NFC Application Development for Android
Subscribe to:
Posts (Atom)
Upgrade nodejs in conda (from v18 to v26)
If your conda env is nodejs v18, doing a conda install nodejs=26 is likely to create a lot of conflict. Consider remove those conflicting p...
-
When Office2003 couldn't find file SKU011.CAB: regedit -> [HKEY_LOCAL_MACHINE] -> [SOFTWARE] -> [Microsoft] -> [Office] -...
-
The resolution can be changed by editing the BlueStack's registry: HKLM\SOFTWARE\BlueStacks\Guests\Android\FrameBuffer\0\Height and ...
-
Suppose you got a file in Big5 containing some HKSCS characters (e.g. 深水埗, 赤鱲角, etc). When your environment (Ref: Charset.defaultCharset( ) ...
