What do you want to save?
Add Code snippet
New code examples
-
Python 2022-03-24 18:30:25
import views
from django.shortcuts import render, redirect from django.urls import reverse_lazy from django.contrib.auth.models import User from django.contrib.auth import authenticate, login from .forms import UserRegistrationForm from django.views.generic import (C... Add solution -
TypeScript 2022-03-24 14:05:01
onblur vs valuechange
new FormControl('', {updateOn: 'blur'}); Add solution -
Javascript 2022-03-24 09:55:05
javascript get cursor position without event
var Cursor_X; var Cursor_Y; document.addEventListener('mousemove', onMouseUpdate, false); document.addEventListener('mouseenter', onMouseUpdate, false); function onMouseUpdate(e){ Cursor_X = e.pageX; Cursor_Y = e.pageY; } Add solution -
Shell/Bash 2022-03-23 22:55:48
locate redis.conf on ununtu / linux
sudo apt update sudo apt install redis-server sudo nano /etc/redis/redis.conf # change "supervised no" to "supervised systemd" supervised systemd sudo systemctl restart redis.service sudo systemctl status redis redis-cli Add solution -
Other 2022-03-23 00:20:08
Executing an update/delete query
/* I received this exception when trying to run a bulk UPDATE query in a non-JTA (i.e. resource-local) entity manager in Java SE. I had simply forgotten to wrap my JPQL code in*/ em.getTransaction().begin(); //and em.getTransaction().commit(); Add solution -
Shell/Bash 2022-03-22 20:40:07
github cli linux
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gp... Add solution -
Other 2022-03-22 16:40:04
change main root directory cpanel
1. access server terminal. using SSH or whatever you now 2. type "sudo su" in terminal to enter root access 3. $ sudo nano /var/cpanel/userdata/CPANEL_USERNAME/DOMAIN.COM 4. find following lines: documentroot: /home/USERNAME/public_html path:... Add solution
Best helpers
Ranking is empty