Ubuntu 管理心得

搜尋此網誌

2021年6月19日 星期六

vmware 3d acceleration

 Add this line to .vmx file:

mks.gl.allowBlacklistedDrivers = "TRUE"

2021年6月9日 星期三

Create desktop url link on gnome

  1. Create file 士林區鄉鎮預報.desktop in /home/chiao/桌面/ contains:
    [Desktop Entry]
    Type=Application
    Terminal=False
    Name=士林區鄉鎮預報
    Icon=/usr/share/icons/hicolor/48x48/apps/firefox.png
    Exec=firefox http://www.cwb.gov.tw/V8/C/W/Town/Town.html?TID=6301100
    Categories=Application;
  2. Right click icon "士林區鄉鎮預報", turn on "允許啟動"
  3. Done

2021年6月8日 星期二

unzip encoding for big5

 unzip -I big-5 hw_157261.zip

 

2021年6月6日 星期日

bold math in beamer

 Add this to the preample:

\usefonttheme{professionalfonts}
 

2021年6月4日 星期五

unzip without folders (directories)

  1.  Download 7z-exe: https://www.7-zip.org/
  2.  Get into cmd window
  3. cd Z:\Classes\109year\Semester2\Calculus\B\HW\HW7
  4. md files
  5. "C:\Program Files\7-Zip\7z.exe" e -ofiles hw_157264.zip

2021年5月24日 星期一

plot linestyle legend fontsize

The following octave commands:

plot(x,[ymat(:,[1,2,4])],{"k-.","k-","k:"},"linewidth", 2)
set(gca,'fontsize',26)
axis([1,6,-20000, 120000])
title(['Health People with minimum t-norm for dpercent=0.05'])  
xlabel('time interval (month)')
ylabel('People (in thousands)') 
yticklabels({"-20","0","20","40","60","80","100","120"})
legend ({"upper bound", "modal value", "lower bound" }, "location", "northeast")
grid on

produce the graph:



2021年4月18日 星期日

[SOLVED] Add nic for creating a subset, dns cannot works,networkmanager priority

sudo mv /etc/resolv.conf /etc/resolve.conf_orig
sudo ln -s /run/resolvconf/resolv.conf /etc/
 
 
The solution for me is to set the network interface priority by setting the metric. 

Edit 網路連線 -> 有線連線2 -> IPv4 -> 路由(R)…,設定度量(Metric)為 99999 :

route -n shows:

chiao@kpchiao9600k:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.50.1    0.0.0.0         UG    101    0        0 eno1
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 enp3s0
192.168.0.0     0.0.0.0         255.255.255.0   U     100    0        0 enp3s0
192.168.0.0     192.168.0.1     255.255.255.0   UG    99999  0        0 enp3s0
192.168.50.0    0.0.0.0         255.255.255.0   U     101    0        0 eno1
192.168.51.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet1
192.168.188.0   0.0.0.0         255.255.255.0   U     0      0        0 vmnet8

2021年4月17日 星期六

ubuntu 18.04 /usr/lib/grub/i386-pc/modinfo.sh doesn't exist

I suspect this is caused by the wrong grub-install. So I do this:
apt purge grub-efi
apt purge grub2-common
 
Make sure grub-instal not exist:
ls  /usr/sbin/grub-instal
bash: /usr/sbin/grub-install: 沒有此一檔案或目錄


2021年4月13日 星期二

drupal error: Type Error: Argument 1 passed to Symfony\Component\HttpFoundation\ParameterBag::replace() must be of the type array,

 https://www.drupal.org/forum/support/installing-drupal/2020-12-06/unable-to-start-drupal-9-webpage-on-server

  1. Open settings.php (/sites/default/settings.php) in any plain text editor. Add this line to the end of the file and save it:

    $settings['rebuild_access'] = TRUE;
  2. Visit http://www.example.com/core/rebuild.php in your browser (where www.example.com is your site’s URL). After a short pause, you should be redirected to the home page of your site, and the cache should be rebuilt.
  3. Open settings.php (/sites/default/settings.php) in a text editor. Find the line you added with $settings[rebuild_access], remove this line, and save the file.

 

Import sql error utf8mb4_0900_ai_ci

 https://pixelthis.gr/content/1273-unknown-collation-utf8mb40900aici

sed -i '' 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g' db.sql 

2021年4月11日 星期日

System Dynamics

cf: /home/chiao/Fuzzy/Literature/SystemDynamics/15-988-fall-1998-spring-1999/contents/readings/teachers.pdf
 
  The level is an accumulation, or integration, or stock, to choose terminology from different fields. The rate is a flow that changes the amount in the level. The rate is defined by a “policy” statement that tells how the rate is controlled by the value of the level in comparison to a goal. All systems, everywhere, consist of these two kinds of concepts --levels and rates--and none other. 

 

Water in a bathtub is a level, the flow of water is the rate that changes the level. A person’s reputation is a level that is changed by the flow of good and bad actions by that person. The degree of frustration in a group is a level that gradually changes in response to surrounding pressures. 
At the point where a rate of flow is being determined, the condition of the system, as indicated by the values of the levels, is compared with a goal to determine control of the flow.  
 
 
A stock is the term for any entity that accumulates or depletes over time. A flow is the rate of change in a stock. 

網誌存檔