👨💻📲💻 FOLLOW US ON INSTAGRAM : https://instagram.com/code__talk?utm_source=ig_profile_share&igshid=1x24zmsfhszaj
🖱⌨️🖥 SUBSCRIBE TO OUR TELEGRAM CHANNEL : https://t.me/coding_talk
😎😄 OUR GITHUB REPO :
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <h1>Simple Checkout with Price Rules</h1> | |
| <div style="padding-bottom: 25px;"> | |
| <h3>Test Case 1: 3 CARI Products</h3> | |
| <p>SKUs Scanned: <code>cari, cari, cari, peti </code></p> | |
| <p>Total expected: $249.00</p> |
👨💻📲💻 FOLLOW US ON INSTAGRAM : https://instagram.com/code__talk?utm_source=ig_profile_share&igshid=1x24zmsfhszaj
🖱⌨️🖥 SUBSCRIBE TO OUR TELEGRAM CHANNEL : https://t.me/coding_talk
😎😄 OUR GITHUB REPO :
Update Homebrew’s package database.
brew update
To install the MongoDB binaries, issue the following command in a system shell:
brew install rabbitmq
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
| import React, { Component } from 'react' | |
| import PropTypes from 'prop-types' | |
| /** | |
| * Utils | |
| */ | |
| const removeElementByIds = ids => { | |
| ids.forEach(id => { | |
| const element = document.getElementById(id) | |
| if (element && element.parentNode) { |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| /* | |
| ##Device = Desktops | |
| ##Screen = 1281px to higher resolution desktops | |
| */ | |
| @media (min-width: 1281px) { | |
| //CSS | |
| module.exports = (knex) => { | |
| return async (query, options) => { | |
| const perPage = options.perPage || 10; | |
| let page = options.page || 1; | |
| const countQuery = knex.count('* as total').from(query.clone().as('inner')); | |
| if (page < 1) { | |
| page = 1; | |
| } |
| <?php | |
| /** | |
| * This wraps blocks of text (delimited by \n) in p tags (similar to nl2br) | |
| * @author Scott Dover <[email protected]> | |
| * @param str | |
| * @return str | |
| */ | |
| function nl2p($string) { | |
| /* Explode based on new-line */ |
The exchange of new line & br HTML tag could refer to PHP - nl2br() function, which uses to inserts HTML line breaks before all newlines in a string.
These JavaScript functions consider whether to use insert or replace to handle the swap.