Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
| // not sure I understand this | |
| let a=1, b=2; | |
| a = a+b; | |
| b = a-b; | |
| a = a-b; |
| const curry = function curry(func) { | |
| return function curried(...args) { | |
| if (args.length >= func.length) { | |
| return func.apply(this, args); | |
| } else { | |
| return function(...args2) { | |
| return curried.apply(this, args.concat(args2)); | |
| } | |
| } | |
| }; |
| const target = {}; | |
| const handler = { | |
| get: (tar, prop) => { | |
| console.log('get',tar, prop) | |
| return tar[prop]; | |
| }, | |
| set: (tar, prop, val) => { | |
| console.log('set', tar, prop, val); | |
| tar[prop] = val; | |
| }, |
| /** | |
| * Use a useEffect for a single purpose | |
| **/ | |
| function App() { | |
| const [varA, setVarA] = useVarA(); | |
| const [varB, setVarB] = useVarB(); | |
| return ( | |
| <span> |
There are four categories defining the level of specificity.
<h1 style="color: #ffffff;">.#navbar..classes, [attributes] and pseudo-classes like :hover, :focus etc.h1, div, :before and :after.# for ID Selections. for class Selections^ for attributes start with a value| let sad = { | |
| data: '"Wazzzzzzup"', | |
| // As you can see this is a Arrow funciton | |
| sayGoGo: () => { | |
| console.log(`Mr Monkey says ${this.data}`); | |
| } | |
| }; | |
| // This will NOT work. `this` ( the context ) |
| // Buckets of Data, with two Items appearing at the top of the list. | |
| // note that OOO and AAA are at the top, whilst everything else is sorted | |
| // Desired outcome: | |
| // ------------------------------------------------------------------------------------------------- | |
| // OOO [ { type: 'OOO', attributes: {} }, { type: 'OOO', attributes: {} } ] | |
| // AAA [ { type: 'AAA', attributes: {} } ] | |
| // BBB [ { type: 'BBB', attributes: {} }, { type: 'BBB', attributes: {} } ] | |
| // ZZZ [ { type: 'ZZZ', attributes: {} }, { type: 'ZZZ', attributes: {} } ] | |
| const desiredFirstItem = 'OOO' |
| // Creates a Dictionary / Index Object for all the objects based on the passed attribute value. | |
| /** | |
| * Create an object with keys based on a passed attribute within the array of values | |
| * @param {[*]} objects - array of objects | |
| * @param {string} attributeName - the attribute name | |
| * @return {*} | |
| */ | |
| var indexByAttribute = function indexByAttribute ( objects, attributeName ) { | |
| return (objects||[]) |