Override the entrypoint in docker-compose.yml for the MariaDB Docker container by adding:
entrypoint: mysqld_safe --skip-grant-tables --user=mysql
The start up the Docker Compose stack:
$> docker-compose up -d
| Here are the steps required to install OpenCV for C++ on the MacBook Pro M1. | |
| 1. If not already installed, install Homebrew, by following instructions here: https://brew.sh/. | |
| 2. If Xcode is not already installed, install it from the App Store (or other methods). | |
| 3. Open a terminal and run: | |
| brew install opencv | |
| 4. In the terminal, run: |
| import { Component, OnInit } from '@angular/core'; | |
| import { OnDestroy } from '@angular/core'; | |
| import { Router, NavigationEnd } from '@angular/router'; | |
| import { Subscription } from 'rxjs/Rx'; | |
| @Component({ | |
| selector: 'scroll-to-anchor-example', | |
| template: `<a type="button" md-button class="button" routerLink="/this-view-url" | |
| fragment="test-fragment" routerLinkActive="active">Go to test fragment</a> | |
| <p>Blah blah blah ...</p> |
| deleteEmptyProps(obj: any): any { | |
| // modifies passed obj in place, removing empty properties (inc. empty arrays) | |
| return Object.keys(obj).forEach(k => { | |
| if (!obj[k] || obj[k] === undefined || | |
| Array.isArray(obj[k]) && obj[k].length === 0) { | |
| delete obj[k]; | |
| } | |
| }); | |
| } |
| 0 info it worked if it ends with ok | |
| 1 verbose cli [ '/home/dan/.nvm/versions/node/v7.9.0/bin/node', | |
| 1 verbose cli '/home/dan/.nvm/versions/node/v7.9.0/bin/npm', | |
| 1 verbose cli 'run', | |
| 1 verbose cli 'build-installer' ] | |
| 2 info using [email protected] | |
| 3 info using [email protected] | |
| 4 verbose run-script [ 'prebuild-installer', | |
| 4 verbose run-script 'build-installer', | |
| 4 verbose run-script 'postbuild-installer' ] |
| let o1 = performance.now(); | |
| let test = ['a', 'b', 'c'] | |
| let toRemove = test.indexOf('b'); | |
| if(toRemove !== -1){ | |
| test.splice(toRemove, 1) | |
| console.log(test); | |
| } | |
| let o2 = performance.now(); | |
| console.log(o2 - o1); |
| def update_url_param(request, param_name): | |
| # function to update request.GET params, retaining all existing params, with param_name added or updated. | |
| existing_params = dict(request.GET) # convert immutable querydict to mutable dict | |
| if not existing_params: | |
| return '?{}='.format(param_name) | |
| else: # if existing params | |
| existing_str = '' | |
| existing_params.pop(param_name, None) # pop off existing param_name if exists | |
| for p, v in existing_params.items(): | |
| existing_str += '{}{}&'.format(p, '={}'.format(v[0]) if v[0] else '') |