linux tee is not responding

From man python: -u Force stdin, stdout and stderr to be totally unbuffered. On systems where it matters, also put stdin, stdout and stderr in binary mode. Note that there is internal buffering in xreadlines(), readlines() and file- object iterators (“for line in sys.stdin”) which is not influenced by this option. To work around this, … Read more

How to create a self-signed certificate for a domain name for development

Using PowerShell From Windows 8.1 and Windows Server 2012 R2 (Windows PowerShell 4.0) and upwards, you can create a self-signed certificate using the new New-SelfSignedCertificate cmdlet: Examples: New-SelfSignedCertificate -DnsName www.mydomain.example -CertStoreLocation cert:\LocalMachine\My New-SelfSignedCertificate -DnsName subdomain.mydomain.example -CertStoreLocation cert:\LocalMachine\My New-SelfSignedCertificate -DnsName *.mydomain.example -CertStoreLocation cert:\LocalMachine\My Using the IIS Manager Note that IIS certificates use SHA-1 hashing, which isn’t … Read more

How to fix Django warning “(models.W042) Auto-created primary key used when not defining a primary key type”?

Your models do not have primary keys. But they are being created automatically by django. You need to choose the type of auto-created primary keys: https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys (new in Django 3.2) Either add this to settings.py: DEFAULT_AUTO_FIELD=’django.db.models.AutoField’ or class Topic(models.Model): id = models.AutoField(primary_key=True) …

Is it possible to insert into two tables at the same time?

In one statement: No. In one transaction: Yes BEGIN TRANSACTION DECLARE @DataID int; INSERT INTO DataTable (Column1 …) VALUES (….); SELECT @DataID = scope_identity(); INSERT INTO LinkTable VALUES (@ObjectID, @DataID); COMMIT The good news is that the above code is also guaranteed to be atomic, and can be sent to the server from a client … Read more

PRE-2016 Valgrind: Still Reachable Leak detected by Valgrind

There is more than one way to define “memory leak”. In particular, there are two primary definitions of “memory leak” that are in common usage among programmers. The first commonly used definition of “memory leak” is, “Memory was allocated and was not subsequently freed before the program terminated.” However, many programmers (rightly) argue that certain … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)