I tried to build Google Filament from source, mostly using GCC/G++, ONLY except its main library Filament’s filament which is built with Clang/Clang++. Of course, I used ALL 3rdparty libraries either from default Ubuntu repository, or manually installed the newest version, rather than using the 3rdparty libraries coming with Filament itself.
How to Use MongoDB with Go?
PyTorch Generator
CMake
1. CMake External From Git
How to clone and integrate external (from git) cmake project into local one
Let's Encrypt Certbot with Nginx
How to Run PostgreSQL Server and Database?
1. Online Tutorials
2. Issues
2.1 psycopg2.OperationalError: could not connect to server: Connection refused
Relevant resource:
- Connection refused with postgresql using psycopg2
- Getting error: Peer authentication failed for user "postgres", when trying to get pgsql working with rails
Solution:
Just modify this file /etc/postgresql/12/main/pg_hba.conf
:
local all postgres peer
=>local all postgres trust
local all all peer
=>local all all md5
2.2 Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?
Relevant resource:
- Postgres could not connect to server
- Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?
- psql: could not connect to server: No such file or directory (Mac OS X)
- How to change the default unix socket location from /tmp for PostgreSQL
Solution:
- find the folder containing the file
postmaster.pid
, and remove it:rm /var/lib/postgresql/12/main/postmaster.pid
- edit file
/etc/postgresql/12/main/postgresql.conf
, in which, set:listen_addresses = '*'
port = 5432
unix_socket_directory = '/var/run/postgresql'
2.3 CREATE EXTENSION in PostgreSQL
Relevant resource:
- How do I import modules or install extensions in PostgreSQL 9.1+?
- Using psql how do I list extensions installed in a database?
Solutions:
- Please make sure
postgresql-contrib
has been installed.
2.4 Deal With GinIndex
Relevant resource:
- How to create GIN index in Django migration
- What is gin_trgm_ops of PostgreSQL?
- gin_trgm_ops does not exist for access method "gin"
- Creating a Gin Index with Trigram (gin_trgm_ops) in Django model
- A Guide to Create User-Defined Extension Modules to Postgres
Solutions:
- Please make sure
btree_gin
andpg_trgm
EXTENSIONs have been CREATEed for the user username in PostgreSQL database. Namely, you need to\c database username
beforeCREATE EXTENSION btree_gin
andCREATE EXTENSION pg_trgm
.
2.5 django.db.utils.ProgrammingError: syntax error at or near "FUNCTION"
Solutions:
- Use PROCEDURE instead of FUNCTION.
2.6 django.db.migrations.exceptions.InconsistentMigrationHistory: Migration site.0001_initial is applied before its dependency account.0003_initial on database 'default'.
Relevant resource:
Solutions:
- Please make sure
\c database username
is run from withinpsql
.
2.7 LOG: SSL is not supported by this build
Relevant resource:
Solutions:
1 | ⋊> ~ sudo su - postgres |
3. Process
Step 1. Install postgresql
and postgresql-contrib
1 | ⋊> ~ apt list --installed | grep postgresql 22:46:41 |
Step 2. Open a FIRST terminal:
1 | ⋊> ~ sudo su - postgres 22:03:23 |
Step 3. Open a SECOND terminal:
- with user postgres,
psql
will do - with other users, such as longervision, you've got to do
psql -U postgres
1 | ⋊> ~ psql -U postgres 22:06:18 |
Step 4. Saleor Reset Migrations (Optional)
Refer to How to Reset Migrations
Run the following 2 lines:
find . -path "*/migrations/*.py" -not -name "__init__.py" -delete
find . -path "*/migrations/*.pyc" -delete
Modify saleor/settings.py
From 1
2
3DATABASE_CONNECTION_DEFAULT_NAME: dj_database_url.config(
default="postgres://saleor:saleor@localhost:5432/saleor", conn_max_age=600
),1
2
3DATABASE_CONNECTION_DEFAULT_NAME: dj_database_url.config(
default="postgres://username:password@localhost:5432/database", conn_max_age=600
),
Start Migration
1 | ⋊> /v/w/v/saleor on main ⨯ python manage.py makemigrations 22:32:00 |
1 | ⋊> /v/w/v/saleor on main ⨯ python manage.py migrate 00:02:56 |
How to Prepare and Upload PPA to Launchpad?
Refer to Launchpad PPA: - Launchpad Packaging/PPA - Launchpad Installing Software - Launchpad Building A Source Package - Building debian packages with debuild - Launchpad Uploading - Launchpad Copying - Basic Overview of the debian/ Directory
Solution
- dput Way
1
dput ppa:longervision/googletest googletest_1.11.0_amd64.changes
- FTP Edit
~/.dput.cf
as:1
2
3
4
5
6[googletest]
fqdn = ppa.launchpad.net
method = ftp
incoming = ~longervision/ubuntu/
login = jiapei100
allow_unsigned_uploads = 0
How to build QtWebEngine?
NEVER successfully built out QtWebEngine before. Today, I'd love to have a try. From this tutorial Building QtWebEngine, it looks possible.
Hugo
1. Official
2. Themes
Tutorials
Nothing but a collection of various tutorials.
0. Comprehensive
0.1 Tutorials
- GeeksforGeeks
- Guru99
- tutorialspoint
- RIP Tutorials
- LeetCode Explore
- Kaggle Courses
- C语言中文网
- W3 Schools
- JaveTPoint
- Beginners Book
0.2 Quizzes
0.3 Interviews
0.4 E-Books
0.5 Blogs
1. Programming Languages
1.1 C
- Cprogramming
- learn-c
- Functions Pointers in C Programming with Examples
- C Tutorial
- C Tutorial
- C17 StackOverflow
- C Standard Library Reference Tutorial
1.2 C++
- learn-cpp
- C++ Tutorial
- Magic Enum C++ Stop the war right away please
- OpenGL vs. DirectX: A Comparison
1.3 GDB
1.4. Java
1.5. Python
- The Python Tutorial
- Python for Programmers
- Python Tutorial
- Python Tutorial
- Python Tips
- Understanding Python Decorators in 12 Easy Steps!
1.6 Golang
1.7 Rust
1.8 Dart
2. Algorithms
3. Robotics
3.1 Comprehensive Open Source
- Top 10 Python Libraries For Robotics
- Top 5 Free and Open Source Robotics Frameworks
- Top 5 Open Source Robotics Software Solutions
3.2 Robotic Arm
4. Linux
4.1 Linux Operating System
4.2. Shell Scripts
- Shell Scripting Tutorial
- Shell Scripting Tutorial: How to Create Shell Script in Linux/Unix
- Advanced Bash-Scripting Guide
- Shell Tips!