If it uses the wayland, WAYLAND_DISPLAY has a wayland name.
$ echo $WAYLAND_DISPLAY
wayland-0
Otherwise, it will be null.
| #include <stdio.h> | |
| #include <fcntl.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <errno.h> | |
| #include <stdlib.h> | |
| #include <sys/epoll.h> | |
| #include <sys/types.h> | |
| int main(int argc, char** argv) { | 
| """Find x in this pyramid | |
| by Pythagorean theorem | |
| 3D drawing by matplotlib""" | |
| import matplotlib as mpl | |
| from mpl_toolkits.mplot3d import Axes3D | |
| import numpy as np | |
| import matplotlib.pyplot as plt | 
| import sqlite3 | |
| import click | |
| from datetime import datetime | |
| DB = 'places.sqlite' | |
| @click.command() | |
| @click.option('-s', '--start-time', type=click.DateTime(formats=["%Y-%m-%dT%H:%M"])) | |
| @click.option('-e', '--end-time', type=click.DateTime(formats=["%Y-%m-%dT%H:%M"])) | |
| def firefox_history(start_time, end_time): | 
When I compiled tdesktop through docker, I met an error of "out of space".
After I spent some time I found it was because the docker wrote a lot of logs in /var folder.
To clean up the logs, you can follow these steps:
Find the big size files in /var/lib/docker.
find /var/lib/docker -size +10M
Ubuntu 19.10에서 Visual Studio Code 사용 중 한영 전환키를 누르고 한글을 입력하려 했더니,
한글 입력이 안되고 영어만 계속 입력되는 현상을 발견했다. 그래서 인터넷을 검색해 봤더니
snap 형식의 Visual Studio Code를 설치한 경우에, Ubuntu의 입력기인 IBus와 충돌해서 일어나는
현상이라고 한다. 그런데 .deb 형식의 Visual Studio Code를 설치한 경우에는 그런 문제가
없다는 사실을 알게 되어, 설치해 봤더니 한글 입력이 정상적으로 이루어지는 것을
확인했다. 그래서 같은 문제를 겪는 사람들을 위해 이 해결법을 공유하고자 한다.
| # candump can0 -ta | |
| # data analysis | |
| ''' | |
| (1541915735.968732) can0 000 [2] 81 74 | |
| (1541915735.978482) can0 774 [1] 00 | |
| (1541915735.978591) can0 774 [1] 7F | |
| (1541915735.983890) can0 674 [8] 2B 17 10 00 90 01 00 00 | |
| (1541915735.984228) can0 5F4 [8] 60 17 10 00 00 00 00 00 | |
| time dev canid size data | |
| ''' | 
| // gcc ledgui.c `pkg-config --cflags gtk+-3.0 pkg-config --libs gtk+-3.0` | |
| // It will have very high CPU load when you run this code. | |
| // You can find the fixed version of this code at here: | |
| // https://stackoverflow.com/questions/64019411/very-high-cpu-load-when-i-run-my-own-simple-gtk-application | |
| #include <gtk/gtk.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #define LED_COLOR_RED 0 | 
| import numpy as np | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| from matplotlib.widgets import Button | |
| import mplcursors | |
| df = pd.DataFrame() | |
| fig, ax = plt.subplots() | 
| ,lat,lng,street,suburb,auction,property_type,land_size,land_unit,baths,beds,parking,price,sold,date | |
| 0,-27.2223167,153.027618,,MANGO HILL,,House,809.0,m²,1,3,4,350000,Sold by private treaty, | |
| 1,-27.183754,153.021286,6 Logan Terrace,DECEPTION BAY,,House,622.0,m²,1,3,1,320000,Sold by private treaty, | |
| 2,-27.7408962,153.091751,"45-59 Rossmore Road,",CHAMBERS FLAT,,House,0.0,m²,3,6,4,1260000,Sold by private treaty 06 Dec 2019,2019-12-06 | |
| 3,-27.04538,153.144241,103 Sunderland Drive,BANKSIA BEACH,,House,546.0,m²,1,3,3,370000,Sold by private treaty 05 Dec 2019,2019-12-05 | |
| 4,-27.42381,153.059616,8 Bennison Street,ASCOT,,House,962.0,m²,2,5,2,2250000,Sold by private treaty 05 Dec 2019,2019-12-05 | |
| 5,-27.1455879,152.975281,7 Ogilvy Road,BURPENGARY,,House,1133.0,m²,2,3,2,545000,Sold by private treaty 06 Dec 2019,2019-12-06 | |
| 6,-27.02739,153.150085,16 Honeymyrtle Street,BANKSIA BEACH,,House,0.0,m²,2,3,2,507500,Sold by private treaty 05 Dec 2019,2019-12-05 | |
| 7,-27.033287,153.125656,78 White Patch Esplanade,WHITE PATCH,,House,2023.0,m² |