- Go to: 'System Preferences' >> 'MySQL' and stop MySQL
OR,
- sudo /usr/local/mysql/support-files/mysql.server start
- sudo /usr/local/mysql/support-files/mysql.server stop
| CREATE TABLE employees ( | |
| emp_no INT NOT NULL, | |
| birth_date DATE NOT NULL, | |
| first_name VARCHAR(14) NOT NULL, | |
| last_name VARCHAR(16) NOT NULL, | |
| gender ENUM ('M','F') NOT NULL, | |
| hire_date DATE NOT NULL, | |
| PRIMARY KEY (emp_no) | |
| ); |
| # Put this function to your .bashrc file. | |
| # Usage: mv oldfilename | |
| # If you call mv without the second parameter it will prompt you to edit the filename on command line. | |
| # Original mv is called when it's called with more than one argument. | |
| # It's useful when you want to change just a few letters in a long name. | |
| # | |
| # Also see: | |
| # - imv from renameutils | |
| # - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste) |
| # aproducer.py | |
| # | |
| # Async Producer-consumer problem. | |
| # Challenge: How to implement the same functionality, but no threads. | |
| import time | |
| from collections import deque | |
| import heapq | |
| class Scheduler: |
| version: "3" | |
| networks: | |
| kong-net: | |
| driver: bridge | |
| services: | |
| ####################################### | |
| # Postgres: The database used by Kong |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
This very simple and minimal tutorial documents in a few easy steps how to play with WebAssembly (WASM) and get first results within minutes.
While the code below is mostly useless, it will show, how to call the alert function from within a WASM file and thus demonstrate how to import and export DOM objects.
Of course, this exercise has no real use. It is just meant to show, that getting started with WASM isn't hard. And there is no need for a complex build-chain, tons of tools or a dedicated VMs. Just use a browser, one online tool and that's it.
| function mySlowFunction(baseNumber) { | |
| console.time('mySlowFunction'); | |
| let result = 0; | |
| for (var i = Math.pow(baseNumber, 7); i >= 0; i--) { | |
| result += Math.atan(i) * Math.tan(i); | |
| }; | |
| console.timeEnd('mySlowFunction'); | |
| } | |
| mySlowFunction(8); // higher number => more iterations => slower |
| from fabric.api import * | |
| import os,json | |
| from os.path import expanduser | |
| env.forward_agent = True | |
| USER_DETAILS = os.path.join(expanduser('~'),'userdetails.json') | |
| def commit(message): | |
| local('git add .') | |
| local('git commit -m "' + message + '"') |