First, install url-loader along side with svgr: yarn add -D url-loader.
Add the loader to svg test option:
{
test: /\.svg$/,
use: ["@svgr/webpack", "url-loader"],
},| const getNonConstructibleChange = (input) => { | |
| const coins = input.sort((a, b) => a - b); | |
| let currentChange = 0; | |
| coins.forEach((coint) => { | |
| const aimedChange = currentChange + 1; | |
| if (coint > aimedChange) return aimedChange; | |
First, install url-loader along side with svgr: yarn add -D url-loader.
Add the loader to svg test option:
{
test: /\.svg$/,
use: ["@svgr/webpack", "url-loader"],
},| // Fill out your copyright notice in the Description page of Project Settings. | |
| #include "LectureWidget.h" | |
| #include "Blueprint/WidgetTree.h" | |
| #include "Components/Button.h" | |
| #include "Components/Image.h" | |
| #include "Components/CanvasPanel.h" | |
| #include "Components/CanvasPanelSlot.h" | |
| #include "Layout/Anchors.h" |
First, we need to install allr required libraries:
sudo pacman -S python-numpy vtk hdf5 openmp opencv cuda cudnn
It installs all requirements to work with the GPU and the OpenCv's support to Darknet and other libraries; hdf5 is required to work with opencv in python; vtk is required to compile Darknet.
By default Darknet handles libraries' references on Debians based linux systems, then, it requires opencv's as well as cuda references to work; in ArchLinux, opencv is in its 4.1.0 and it used opencv4 as environment variable, we need change the reference then:
sudo cp /usr/lib/pkgconfig/opencv4.pc /usr/lib/pkgconfig/opencv.pc.
While the cuda library is installed in a different folder than Debian's based systems, we need to created a symbolic link to solve this problem:
sudo ln -s /opt/cuda/ /usr/local/cuda.
If we have access to the grub rescue, we can do the next steps:
grub rescue > ls
(hd0)... (hd0,gpt8)...
grub rescue > ls (hd2,gpt8) # try to recognize which partition is this
grub rescue > ls (hd2,gpt6) # let's assume this is the linux partition
grub rescue > set root=(hd2,gpt6)
grub rescue > set prefix=(hd2,gpt6)/boot/grub # or wherever grub is installed
grub rescue > insmod normal # if this produced an error, reset root and prefix to something else ..
grub rescue > normal
Enter to superuser: sudo su
Enter to postgres user: sudo -iu postgres
Enter to user: sudo -iu $username$
Enter to console with authentication: psql -d $databasename$ -U $username$ -W
Enter to postgres console(default database): psql
Enter to postgres console(other database): psql -d $databasename$
Disconnect: \q
List all databases: \l
List all schemas: \dn
| # Golbal queries | |
| class GlobalQueryMixin(object): | |
| """ | |
| Mixin for get a global template query | |
| post: Most ranked recipe | |
| tops: Five most ranked recipes | |
| top fruits: Three most ranked fruit recipes | |
| random: Four random recipes | |
| fruits: Four fruit recipes | |
| desserts: Four desserts recipes |
Crontab
export EDITOR=nano
crontab -e
crontab -l
Docker
docker-compose updocker-compose down| # PriorityFormSet = formset_factory(PriorityForm, extra=5, can_delete=True) | |
| PriorityFormSet = modelformset_factory(Priority, form=PriorityForm, extra=3, can_delete=True) | |
| # TicketStatusFormSet = formset_factory(TicketStatusForm, extra=3, can_delete=True) | |
| TicketStatusFormSet = modelformset_factory(TicketStatus, form=TicketStatusForm, extra=3, can_delete=True) | |
| # TicketTypeFormSet = formset_factory(TicketTypeForm, extra=3, can_delete=True) | |
| TicketTypeFormSet = modelformset_factory(TicketType, form=TicketTypeForm, extra=3, can_delete=True) | |
| class PriorityForm(forms.ModelForm): |