What is thread safe or non-thread safe in PHP?

Needed background on concurrency approaches: Different web servers implement different techniques for handling incoming HTTP requests in parallel. A pretty popular technique is using threads — that is, the web server will create/dedicate a single thread for each incoming request. The Apache HTTP web server supports multiple models for handling requests, one of which (called … Read more

Find the version of an installed npm package

Use npm list for local packages or npm list -g for globally installed packages. You can find the version of a specific package by passing its name as an argument. For example, npm list grunt will result in: projectName@projectVersion /path/to/project/folder └── grunt@0.4.1 Alternatively, you can just run npm list without passing a package name as … Read more

What is __init__.py for?

It used to be a required part of a package (old, pre-3.3 “regular package”, not newer 3.3+ “namespace package”). Here’s the documentation. Python defines two types of packages, regular packages and namespace packages. Regular packages are traditional packages as they existed in Python 3.2 and earlier. A regular package is typically implemented as a directory … Read more

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