Deprecated: Constant E_STRICT is deprecated in /var/www/html/thenorth/thenorth/system/core/Exceptions.php on line 75

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_URI::$config is deprecated

Filename: core/URI.php

Line Number: 101

Backtrace:

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Router::$uri is deprecated

Filename: core/Router.php

Line Number: 127

Backtrace:

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$benchmark is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$config is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$log is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$hooks is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$utf8 is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$uri is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$exceptions is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$router is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$output is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$security is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$input is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$lang is deprecated

Filename: core/Controller.php

Line Number: 75

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$load is deprecated

Filename: core/Controller.php

Line Number: 78

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$db is deprecated

Filename: core/Loader.php

Line Number: 397

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_DB_mysqli_driver::$failover is deprecated

Filename: database/DB_driver.php

Line Number: 371

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$form_validation is deprecated

Filename: core/Loader.php

Line Number: 1273

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$main_model is deprecated

Filename: core/Loader.php

Line Number: 359

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 7
Function: __construct

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property Main::$data is deprecated

Filename: controllers/Main.php

Line Number: 92

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 92
Function: _error_handler

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$benchmark is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$config is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$log is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$hooks is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$utf8 is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$uri is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$exceptions is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$router is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$output is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$security is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$input is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$lang is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$load is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$db is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$form_validation is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$main_model is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

A PHP Error was encountered

Severity: 8192

Message: Creation of dynamic property CI_Loader::$data is deprecated

Filename: core/Loader.php

Line Number: 932

Backtrace:

File: /var/www/html/thenorth/thenorth/application/controllers/Main.php
Line: 99
Function: view

File: /var/www/html/thenorth/thenorth/index.php
Line: 308
Function: require_once

TheNorth

Count rows of all tables of a DB

I need to know the way of counting all the rows of every table inside a DB

Created: 2018-12-08 01:09:30

We use information_schema MySQL table:

 SELECT table_name, table_rows 
FROM INFORMATION_SCHEMA.TABLES 
WHERE TABLE_SCHEMA = 'database_name';

Created: 2018-12-12 00:05:11

Find out the amount of duplicates within columns of a Table

I need know how to count the amount of rows that have duplicates based on one or more columns of interest. ie: I want to know in the table 'listings' how many of them have the same 'address'

Created: 2018-12-08 01:13:14

For the duplicates in one column, in this case col3:


SELECT col1, col2, count(col3) as con
FROM table_name
GROUP BY col3 
HAVING con > 1;
If we wanted to find the duplicates in more than one column:
SELECT 
    col1, COUNT(col1),
    col2, COUNT(col2),
    ...
FROM table_name
GROUP BY col1, col2, ...
HAVING (COUNT(col1) > 1) 
AND (COUNT(col2) > 1) AND ...

Created: 2018-12-12 00:15:37

Delete duplicates of a Table based on one or more similar column criteria

I need to delete every row from a column that has a duplicate in one or more of the columns, and keep the most recent row

Created: 2018-12-08 01:15:10

We join the table within itself, pair it by the column of interest, and delete all but the bigger id:

 
DELETE t1 FROM mytable t1
INNER JOIN
    mytable t2 
WHERE
    t1.id < t2.id AND t1.column = t2.column;

Created: 2018-12-11 11:34:49

Number Range in a for loop in Bash

I need to know how to use a number range in a for loop inside bash CLI

Created: 2018-12-08 02:33:29

We can use 'seq' command within the for loop:

END=10
for i in $(seq 1 $END); do echo $i; done

Created: 2018-12-12 23:30:13

Store result of MySQL query into a file

I need to run a MySQL query and store the results in a file that I specify. Within MySQL cli and from the CLI both.

Created: 2018-12-11 08:48:22

Within MySQL CLI, you go:

SELECT *
FROM table
WHERE column = 'bar'
INTO OUTFILE '/var/lib/mysql-files/orders.csv'
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n';

Created: 2018-12-11 12:06:32

Replace regular expression pattern in a file

I need to replace tab character with 4 spaces for indentation.

Created: 2018-12-12 00:20:01

We use 'sed' escaping where \t is the tab character:

sed -i.bak 's/\t/    /g' filename
Any Regular Expression (regex) is valid here.

Created: 2018-12-12 00:21:42

Create MySQL User and grant access

Como crear un usuario en mysql y darle acceso a cierta database

Created: 2019-02-15 14:40:25

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
FLUSH PRIVILEGES;

Created: 2019-02-15 14:42:13

MySQL: Size of a Database in Disk

I want to know how much space is a DB utilizing

Created: 2019-09-18 08:01:49


SELECT table_schema AS "Database Name", 
ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size in (MB)" 
FROM information_schema.TABLES 
GROUP BY table_schema;

Created: 2019-09-18 08:02:47

Change String by RegEx in multiple files in a directory

I wanted to change every occurrence of a string in all the files under a directory using a Regular Expression using sed

Created: 2019-09-27 18:51:44

 ~$ find ./ -type f -exec sed -i 's/http:/https:/g' {} + 

Created: 2019-09-27 18:58:06

Installing LESS compiler without having to install node

I don't want node but I want the ability to compile less files

Created: 2019-10-09 11:10:08

In Ubuntu:

sudo apt install node-less
Using:
lessc  --source-map source_file.less file.css

Created: 2019-10-09 11:11:46

Perform an Addition of a column that is result of a "ls" or "wc" command

This is useful if you have many files and you want to sum all the lines of all the files to know how many lines are in total

Created: 2019-10-11 09:46:37

 user# sum=0; for i in `ls exports/funnel`; do ((sum=sum+`wc exports/funnel/$i | awk '{print $1}'`)); done;
# echo $sum
526621

Created: 2019-10-11 09:50:59

What services are listening

I want to know what are the services that are running and listening, I want to know through which network and in which port they are listening

Created: 2020-02-20 07:41:08

for TCP connections:


netstat --numeric -l -p -A ip | grep tcp

Created: 2020-02-20 07:42:58

JavaScript Async issue

The problem is that JS executes everything who knows when, I needed the proper way to call for a function and wait for that function to return in order to continue the execution

Created: 2020-04-24 09:01:19

The most common way to address this is by using a callback. This is basically the async way to wait for a return value. Here's how you could use it in your case:


function initialize() {
    //Geocode Address to obtin Lat and Long coordinates for the starting point of our map
    geocoder = new google.maps.Geocoder();
    geocode(geocoder, function(results) {
        // This function gets called by the geocode function on success
        makeMap(results[0].geometry.location.lat(), results[0].geometry.location.lng());        
    });
}

function geocode(geocoder, callback) {
    //do geocoding here...

    var address = "3630 University Street, Montreal, QC, Canada";
    geocoder.geocode({ 'address': address }, function (results, status) {
        if (status == google.maps.GeocoderStatus.OK) {
            // Call the callback function instead of returning
            callback(results);
        } else {
            alert("Geocode was not successful for the following reason: " + status);
        }
   });

}

Created: 2020-04-24 09:03:03

Sort the User Agent in apache logs ordered by requests count

I want to be able to see how many requests have been done by user agent

Created: 2020-06-01 10:03:26

awk -F\" '{print $6}' /var/log/apache2/realtyhive_access.log | sort | uniq -c | sort -fr

Created: 2020-06-01 10:04:39