I chose my starting directory to be /var/www
~: cd /var/www
/var/www: npx create sample-app
---stuff happens, may take a minute---
When it get done, I move into that project directory that got created (the root directory of the react project)
I chose my starting directory to be /var/www
~: cd /var/www
/var/www: npx create sample-app
---stuff happens, may take a minute---
When it get done, I move into that project directory that got created (the root directory of the react project)
Create a Sample Barebones web app that enables only this:
(function() { | |
var el = document.createElement("div"), | |
b = document.getElementsByTagName("body")[0], | |
otherlib = !1, | |
msg = ""; | |
el.style.position = "fixed", el.style.height = "32px", el.style.width = "220px", el.style.marginLeft = "-110px", el.style.top = "0", el.style.left = "50%", el.style.padding = "5px 10px", el.style.zIndex = 1001, el.style.fontSize = "12px", el.style.color = "#222", el.style.backgroundColor = "#f99"; | |
function showMsg() { | |
var txt = document.createTextNode(msg); | |
el.appendChild(txt), b.appendChild(el), window.setTimeout(function() { |
This is a running list of things I'm keeping that might help you in your Comp Sci studies, or freelance jobs once you start actually working on projects. Getting a working knowledge of these things sooner should give you a head start.
Concepts to Learn (not in any particular sequence)
<div style="width:80px;height:20px;padding:10px;margin:10px;background-color:#000000">#000000</div> | |
<div style="width:80px;height:20px;padding:10px;margin:10px;background-color: #434343">#434343</div> | |
<div style="width:80px;height:20px;padding:10px;margin:10px;background-color: #666666">#666666</div> | |
<div style="width:80px;height:20px;padding:10px;margin:10px;background-color: #999999">#999999</div> | |
<div style="width:80px;height:20px;padding:10px;margin:10px;background-color: #cccccc">#cccccc</div> | |
<div style="width:80px;height:20px;padding:10px;margin:10px;background-color: #efefef">#efefef</div> | |
<div style="width:80px;height:20px;padding:10px;margin:10px;background-color: #f3f3f3">#f3f3f3</div> | |
<div style="width:80px;height:20px;padding:10px;margin:10px;background-color: #ffffff">#ffffff</div> | |
<div style="width:80px;height:20px;padding:10px;margin:10px;background-color: #fb4c2f">#fb4c2f</div> | |
<div style="width:80px;height:20px;padding:10px;margin:10px;background-color: #ffad47">#ffad47</div> |
'use strict'; | |
const Promise = require("bluebird"); | |
const fs = require("fs"); | |
const exec = require('child_process').exec; | |
const write = Promise.promisify(fs.writeFile); | |
const read = Promise.promisify(fs.readFile); | |
const rename = Promise.promisify(fs.rename); | |
const unlink = Promise.promisify(fs.unlink); | |
const storage = require('@google-cloud/storage')(); |
'use strict'; | |
const Promise = require("bluebird"); | |
const fs = require("fs"); | |
const exec = require('child_process').exec; | |
const write = Promise.promisify(fs.writeFile); | |
const read = Promise.promisify(fs.readFile); | |
const rename = Promise.promisify(fs.rename); | |
const unlink = Promise.promisify(fs.unlink); | |
const storage = require('@google-cloud/storage')(); |
var pokedex = [ | |
{ | |
"name": "Bulbasaur", | |
"base": { | |
"Attack": 49, | |
"Defense": 49, | |
"HP": 45, | |
"Speed": 45 | |
} | |
}, |
var bookprices = { | |
// each book in the series costs $14 each, there are 7 books in the series | |
"HarryPotter" : { | |
price: 14, // the price of one book | |
books: 7 // the number of books in the series | |
}, | |
"CaptainUnderpants": { | |
price: 5, | |
books: 12 | |
}, |
/* | |
Assignment 2: | |
Use a while loop to print out how much each kid spent on books. Each kid buys only the number stated in the kid's record, not the number in the series. | |
Also show how much each kid has in his bank after spending the money on the books he bought. | |
Example: | |
Jason spent $28 on HarryPotter books. He has $72 left. | |
*/ |