1.1 insert one document:
insertOne:
db.movies.insertOne({"title": "stand by me"})
these commands are specific to mongo shell (mongosh command):
flights
db will be created on the fly.BSON
(which is binary json) for storing data in database.<?php | |
// Attributes (AKA Annotations). | |
#[Attribute(Attribute::IS_REPEATABLE | Attribute::TARGET_FUNCTION)] | |
class CharDecoratorAttribute | |
{ | |
public function __construct(protected string $char) // Constructor Property Promotion | |
{ | |
} | |
public function decorate(Closure $fn): Closure |
npx create-react-app <your_project_name>
**note:
The main difference between "npm create-react-app" and "npx create-react-app" lies in how they are used to create a new React application.
.py
extension.*
is printed 10 time:print("*" * 10)
Most PHP programmers have used PHP strictly in a web server environment. In such an environment, PHP is a CGI/Fast GGI or server module called and controlled by the HTTP server (usually Apache, IIS, Nginx, or similar)\
The HTTP server receives a request for a PHP-based web page and calls the PHP process to execute it, which usually returns output to the HTTP server to be sent on to the end user.
create a copy from a table:
suppose we have already a table named: orders
and we want to make a copy from this table which name will be order_archived
.\
CREATE TABLE order_archived AS
SELECT * FROM orders
but please note: this way does not copy some column attributes like primary key.
run time complexity
O(1) — Constant Time:
O(log n) — Logarithmic Time: The number of steps it takes to accomplish a task are decreased by some factor with each step.
O(n) — Linear Time: The number of of steps required are directly related (1 to 1).
O(n²) — Quadratic Time: The number of steps it takes to accomplish a task is square of n.\