Viewing posts for the category Omarine User's Manual

Optional type in Swift

Optional type is used when the value may be absent. A variable or constant is optional if there is a question mark after the type name. For example

var index: Int? = nil

Because the value of an optional type may be nil, the compiler does not allow access to its data. For example, the print(index) statement will report an error.
However, we can check its value condition using if. For example

if index != nil { ... }

We can also check for the condition of the value initialization of another constant where the optional value is assigned to the constant. For example

if let i = index { print(i) }

If the value of index is nil, the constant initialization fails and returns false, then the statement block in the body of the conditional expression is not executed. Conversely, if the index has a value, that value is rendered

AppArmor vs SELinux

SELinux controls access based on the labels of the files and processes while AppArmor controls access based on the paths of the program files. While AppArmor is easier in administration, the SELinux system is more secure.
AppArmor's motto is to allow everything then tighten gradually. In contrast, SELinux refuses everything then loosens up gradually. Right here we have seen that SELinux places more emphasis on security. For example, for preventing applications from accessing the password file (/etc/shadow), SELinux only needs to grant a few dedicated programs permission while AppArmor is difficult to prevent thousands of applications if don’t want to say impossible in the case of a strange program that has no profile and is therefore not confined. The AppArmor's App prefix shows us that it cares about the apps rather than the system. Below is a detailed comparison in the present moment

SELinux: snapd: Confining snaps to their private domain

Snaps are applications that are installed and updated automatically using snapd. If you are using the Swift programming language, the good IDE environment for it is Visual Studio Code (vscode). Visual Studio Code is a snap and you can install it as follows:

An idea on how to find the COVID-19 pandemic vaccine

As any person on our planet needs an obligation to prevent the COVID-19 pandemic, for themself and for others, I don't hesitate to state an idea of how to find the COVID-19 vaccine

Origin of the idea

COVID-19 caused terrible global damage with no signs of decline, lasted for nearly one year without a clear effective vaccine.

COVID-19 is a non-trivial pandemic. Vaccines before mass application must be tested in humans on a large scale. That requires a scientific measure worthy of the virus to thoroughly handle, avoiding dangerous side effects for the participants in the test.

COVID-19 opened a new stage of world medicine. Old knowledge cannot solve new problems. That requires discovering new laws of knowledge instead of deducing from old laws of knowledge. This is true of all disciplines including medicine. Fortunately, we have Machine Learning to fulfill this requirement.

Theoretical basis

In the third industrial generation, digitalization has removed a lot of unnecessary information, thereby shrinking a problem's large space into small. However, the digital itself is only used to quickly handle problems that have already been solved.
Today's Machine Learning, that is, in the fourth industrial generation, especially Genetic Algorithms is capable of synthesizing knowledge into new knowledge and thus solving unsolved problems, is very suitable for assist in the treatment of the coronavirus family with a large number of complex viruses that cause pandemics as the 21st century incident.

The destruction of nature and the extinction of many animals caused by humans disrupt the ecological balance. The coronavirus family that was only adapted in animals was forced to evolve over many generations, until COVID-19 was so sophisticated that it could live in humans and transmit disease at an unexpected rate with a way that the world medicine has yet to grasp.

But we believe that if the sun is still shining, we can completely control COVID-19 and its descendants in the future.

In fact, the world medicine has not been able to accurately determine COVID-19 and its evolutionary process and cannot describe the symptoms clearly. The leaf remedies of the problem only follow the virus because it has transformed into another variant. The evidence is that the second wave of COVID-19 outbreaks is raging with greater intensity and sophistication than before. Stereotyped prevention campaigns are both omitted and redundant. As a result, the epidemic is not stopped while economic losses are heavy.

To handle the root cause, we need to know the structure, basic properties, living conditions and other professional information of COVID-19 in order to determine the vaccine properly.

Genetic Algorithms - the highest representative of evolutionary machine learning, will come up with the problem at hand as an obvious obligation.


Medical professionals, microbiologists, epidemiologists need to give analysis, known characteristics or assumptions of coronavirus ancestors since they can only live in animals, as initialization parameters. The Genetic Algorithms will then evolve them until the generation where the virus is adapted to infect humans, COVID-19 must reveal its original form.

Not only virus identification, Genetic Algorithms can aid in vaccine production. It is the most powerful tool for solving complex constraint problems with an unlimited number of variables and constraints (up to the limit of computer resources) and any nonlinear mapping. Genetic algorithms can be used to solve the multi-goal problem with a reasonable medicinal ratio: correct the disease without causing side effects while being affordable, and satisfy other arbitrary conditions of the manufacturer.  So

Medicine + Genetic Algorithms = Successfully eradicate COVID-19

I am ready to provide the algorithms and cooperate with organizations and individuals interested in this solution.

All the best,
Pham Thanh Tuyen - Author of Football Predictions

SELinux: polkit: Default security context

When using PAM services such as login, su, sudo, polkit-1, sshd, gdm-password, PAM will perform a manual domain transition with the new security context selected as the default security context. The default security context is configurable. The general configuration file is /etc/selinux/omarine/contexts/default_contexts and the configuration files for specific SELinux users are located in the /etc/selinux/omarine/contexts/users directory.

If we configure the default security contexts in the file /etc/selinux/omarine/contexts/default_contexts then PAM may be confused as it chooses the first context in a context list taken from the configuration file. Hence the safe way is to configure the default security contexts in the files in /etc/selinux/omarine/contexts/users directory for each specific SELinux user.

For example, when we run pkexec command of polkit to execute a program as the root user, the configuration file /etc/selinux/omarine/contexts/users/root will be used to get the default security context for the root user.
The type of the pkexec program file is pkexec_exec_t (this is an Omarine-specific type)