Notes - JavaScript
DOM
getElementById()
Note: no “#” at the beginning of the id
| |
Get/Set InnerText
| |
Note: no “#” at the beginning of the id
| |
| |
| |
| |
Will get the following error:
When access some websites, like Vendor Central, we don’t have the option to get credentials/API keys to connect from our apps. We can go to the website using our current credential and connect to it from our app.
SELECT DISTINCT report_date FROM daily;
SELECT count(*) from vanall WHERE Shipped_Date="2021-01-12";
-- Current max date in the table
SELECT max(Shipped_Date) from vanall;
INSERT or replace INTO daily (date,name_id,testing_hour,sellable,liquidation,quality,concession)
VALUES ("2021-02-01",5,1.0,2,3,4,5);
-- insert new data from temp into table vanall
INSERT INTO vanall
SELECT * from temp where Shipped_Date>"2021-01-12";
UPDATE associate SET show=1 WHERE show IS NULL
-- remove all the assets that are not shipped yet
DELETE FROM vanall WHERE Shipped_Date is NULL
-- delete table
DROP TABLE associate;
with yvr3(facility,class,cat, sub) as
(select "YVR3", class,cat, count(*) as sub from amazon where location < "QC-76.11"
group by class,cat),
yyc1(facility, class,cat,sub) as
(select "YYC1", class,cat,count(*) as sub from amazon where location > "QC-76.10"
group by class,cat)
select yyc1.facility,yyc1.class,yyc1.cat, yyc1.sub from yyc1
left join yvr3
on (yyc1.class=yvr3.class and yyc1.cat=yvr3.cat)
where yvr3.cat is null
order by yyc1.sub desc;
Sqlite doesn’t support FULL OUT JOIN or RIGHT JOIN.
It’s easy to perform a RIGHT OUTER JOIN in SQLite by simply reversing the order of tables and using a LEFT OUTER JOIN.
It’s also possible to do a FULL OUTER JOIN by combining LEFT OUTER JOINs using the UNION keyword.
Signup or login to Github
Click Create Repository

Repository name: renewalfamily/website > Click Create Repository
We get these free T51A radio from Uline. It can cover more than 1 mile range for us to communicate within warehouse.
Homebrew: The Missing Package Manager for macOS (or Linux)
// Install the Howebrew from Mac terminal
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
homebrew install caddy
To start caddy new and restart at login:
There are boolean, rune, integer, floating-point, complex, and string constants. Rune, integer, floating-point, and complex constants are collectively called numeric constants.
reCAPTCHA is a free google service that protects your website from spam and abuse. reCAPTCHA uses an advanced risk analysis engine and adaptive challenges to keep automated software from engaging in abusive activities on your site. It does this while letting your valid users pass through with ease.
ls /var/www -al
sudo adduser new_username
// or
sudo useradd new_username
sudo userdel username
// remove user's home folder
sudo rm -r /home/username
// set / change password for user postgres
sudo passwd postgres
adduser username sudo
// or
usermod -aG sudo username
su // as root
su - postgres // login as postgres
su postgres // switch to postgres
// preserve the entire environment (HOME, SHELL, USER, and LOGNAME) of the calling user
su -p postgres