bloominstituteoftechnology / precourse Goto Github PK
View Code? Open in Web Editor NEWThis repo contains the instruction material and assignments for Lambda School's pre-course program.
This repo contains the instruction material and assignments for Lambda School's pre-course program.
Lambda Precourse Lesson 12 homework instruction file errors :
most suggested changes in < >, but some got lost that way, so the typos have been changed without note.
From the file : Precourse/Lesson12-DOM/homework/README.md :
<suggest DOM replace JSVII >
Feynman Writing Prompts - Write out explanations of the following concepts like you are explaining it to a 12 year old. Doing this will help you quickly discover any holes in your understanding. Ask your questions on Slack.
*** Stretch Goals: Everything after this line is optional ***
*** These tests are optional, any work you do to complete these tests is extra. That being said, having exposure to these concepts and attempting them is recommended. The better you understand these concepts, the better your experience will be at Lambda School. ***
2. Uncomment lines 7 through 108 in the file DOM.test.js
from the __test__
folder within this homework
folder. Then, from the top level of your Precourse
folder, run npm test JSVII.test.js
< JSVII.test.js should be replaced with DOM.test.js >
to run the automated tests. You will fill out the functions in homework.js
< homework.js should be replaced with DOMhomework.js>
to make the tests pass.
Also in the DOMhomework.js file the following line should be added in step 4 :
5.5) Add an event listener for a button click for toDoText leading to a call of completeToDo
im new to git and having a problem cloning ....any help?
There is either omissions or typos in the following statements :
//In the next 22 problems you will compete the function. All of your code will go inside of the function braces.
There are only 20 problems.
// The next three questions will have you implement math area formulas.
// If you can't remember these area formulas then head over to Google.
function getRectangleArea(length, width) {
// return the area of the rectangle by using length and width
// code here
}
function getTriangleArea(base, height) {
// return the area of the triangle by using base and height
// code here
}
There are only two problems to consider.
Either these are typos or there are omissions.
In Lesson3-CSS-Positioning README.md file has a typing error in second line:
We can use the justify-contet and align-items properties ...
It's justify-content
Hey guys,
I've been having a bit of trouble downloading nodejs. I am getting the following error message when I try to download it on my terminal:
npm WARN saveError ENOENT: no such file or directory, open '/Users/danroche/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/Users/danroche/package.json'
npm WARN danroche No description
npm WARN danroche No repository field.
npm WARN danroche No README data
npm WARN danroche No license field.
up to date in 1.192s
found 0 vulnerabilities
Would be so grateful for some help on this. I have tried to solve my self but not luck :(
Many thanks,
Dan
DESCRIPTION:
Using reserved identifiers can cause conflicts with the compiler or other system libraries, leading to unexpected behavior or compilation errors.
To fix this issue, choose a different identifier that is not reserved by the implementation. It is recommended to follow naming conventions and avoid using names that are reserved by the language or the compiler.
The C and C++ standards reserve the following names for such use: - identifiers that begin with an underscore followed by an uppercase letter; - identifiers in the global namespace that begin with an underscore.
The C standard additionally reserves names beginning with a double underscore, while the C++ standard strengthens this to reserve names with a double underscore occurring anywhere.
BAD PRACTICE:
namespace NS {
void __f(); // Reserved identifier, not allowed in user code
using _Int = int; // Reserved identifier, not allowed in user code
#define cool__macro // Reserved identifier, not allowed in user code
}
int _g(); // Reserved identifier, disallowed in global namespace only
RECOMMENDED:
namespace NS {
void f(); // Non-reserved identifier, allowed in user code
using Int = int; // Non-reserved identifier, allowed in user code
#define cool_macro // Non-reserved identifier, allowed in user code
}
int g(); // Non-reserved identifier, allowed in global namespace
declaration uses identifier 'WEBCACHE_H', which is a reserved identifier
https://github.com/bloominstituteoftechnology/C-Web-Server/blob/master/src/cache.h#L2C21-L2C21
declaration uses identifier 'FILELS_H', which is a reserved identifier
https://github.com/bloominstituteoftechnology/C-Web-Server/blob/master/src/file.h#L1
.push adds an item to the end of the array, incrementing it's length by 1. (.push returns the entire array)
However, .push returns the length of the new array.
TypeError: Cannot set property 'value' of null
89 |
90 | it('adds a Todo to the toDoItems array', () => {
> 91 | document.querySelector('#newTodoToAdd').value = 'Create new Todo';
92 | addTodo();
93 | expect(toDoItems.length).toBeGreaterThan(0);
94 | });
To be clear, this is an error in the test file, and not in the DOMhomework.js file that students work on. #newTodoToAdd was never an element that was defined and added to the DOM in the aforementioned test file, and so it never is assigned the corresponding value property.
The id toDoInput is referenced as 'newToDo' on Step 7. Suggestion to change notes to reference toDoInput as it's more descriptive.
It is not explicitly stated in the homework that the newly created 'styles.css' file must be linked to 'homework.html' file. The instruction is only to uncomment the styles tags. Is it supposed to be implied?
Referring to this exercise in the homework.js of the fourth lesson (JSIII):
function addCalculateDiscountPriceMethod(storeItem) {
// add a method to the storeItem object called 'calculateDiscountPrice'
// this method should multiply the storeItem's 'price' and 'discountPercentage' to get the discount
// the method then subtracts the discount from the price and returns the discounted price
// example:
// price -> 20
// discountPercentage -> .2
// discountPrice = 20 - (20 * .2)
... solution here ...
return storeItem;
}
It was not clear to me that the storeItem object needed to be returned.
Lesson2-HTML-CSS/homework/homework-readme.txt
Line: 19
an an unordered list with two list items
Using the ! operator works okay on new projects I've created in VS Code, but on the homework it results in the following error :
c:\Users\aelli\LambdaSchool\Precourse\Lesson04-JS-I\homework\homework.js:107
if !(num%2 === 0) {
^
SyntaxError: Unexpected token !
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
Waiting for the debugger to disconnect...
SyntaxError: Unexpected token !
vm.js:80
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
In the homework-readme.txt for part II. Add some style letter G. Add a style rule to 'thirdDiv' changing the height to 600px and the width to 500px. The images overlaps the height of the box, I changed the height to 800px so the images are perfectly positioned inside of the box.
isInRange should probably elaborate that it needs to return false.
#1012 ๐ Please see Pull Request
โ nFibonacci(5)
should have the value of 5
instead test is expecting 8
.
โ changed to nFibonacci(6)
โ nFibonacci(3)
should have the value of 2
instead test is expecting 3
.
โ changed to expect(fib2).toBe(2)
On line 20 "google" could read "Google" though this is just a bit picky, I figured I'd add it since there were already edits to the file needed.
an img tag in each list item linking to your favorite food. (Use google image search to find a photo, if you can't
On line 24 "you" should be "your"
A. Add style tags to you HTML document.
On line 27 "seond" should read "second"
D. Give the span in your seond div the id "spanId".
On line 48 "recoomend" should read "recommend"
do some further homework, I recoomend the additional resources in the README or https://www.w3schools.com/css/default.asp)
There is some minor ambiguity in section III. The heading suggests we are to create our style file and link it to our HTML though the first bullet / instructions tells us to FIND a file and no instruction suggests we link the file.
III. Create an external style sheet and import all of our previous style rules into the new stylesheet.
A. Find styles.css file in this folder.
B. COPY all of your style rules to this new file. (Do not include the style tags!)
C. Place:<!--
in front of your first style tag.
D. Place:-->
after your closing style tag.
Suggested Change
III. Create an external style sheet and import all of our previous style rules into the new stylesheet.
A. Create a new file named styles.css this folder. (Bonus points if you use GIT commands!)
B. COPY all of your style rules to this new file. (Do not include the style tags!)
C. Place: <!--
in front of your first style tag.
D. Place: -->
after your closing style tag.
E. Add a link to your new stylesheet.
Good Day ! I see that this Guides and Tutorial looks pretty impressive
With regards to this , If this is an open-source project then i want to offer free translation in Filipino to bridge you to my fellow countrymen . I would like to propose a Translation/tl_PH repo to work my thing there
Response is higly appreciated . Thank You
In the lesson 10: Javascript VII (Closure) class notes for the mini web boot camp we have the following: Here is the context :
This also applies to the function's parameters:
function makeMultiplier(x) {
return function(y) {
return x * y;
}
}
const multiplyByFive = makeMultiplier(5);
const product1 = multiplyByFive(10);
const multiplyByTwo = makeMultiplier(5);
const product2 = multiplyByTwo(7);
console.log(product1); // logs 50
console.log(product2); // logs 14
For product 2, the const multiplyByTwo = makeMultiplier(5); This implies that we will be multiplying by 5. This doesn't match the context of the constant name, nor does it create a result of product2 = 14 = 2*7.
I am trying to push my homework back on to the server and its saying its denied to me. error 403
querySelector (and querySelectorAll) is a new method that takes a CSS style selector as it's argument. Remember that we can ask for classes in CSS using the #, ids using the ., and elements by using the element name (eg: 'body'). These selectors will use the same format. It is best to only use ids with querySelector because it will only return the first item matching that selector.
Aren't classes referenced with the . and ids with the #?
In my gitbash command line it keeps telling me that it doesnt do https so it is not letting me clone to my computer.
I am having a very hard time with what is called the Terminal. Can someone help me with this. I have windows, and I have download GIT.
Hello, not sure if this is the right repo to submit this issue to but I am having trouble with a repl.it assignment in this section. After answering all exercises for this assignment, I clicked "run tests" and was told that I had failed all sections, including the exampleExercise even though I did not change anything for the exampleExercise. I was given the following error:
ReferenceError: exampleExercise is not defined
at eval (eval at n.evaluate (https://repl.it/public/replbox_lang/2.20.0/javascript.js:237:152404), :4:5)
at https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290616
at n.run (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290835)
at n.execute (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:289470)
at e.M [as queueRunnerFactory] (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:250740)
at e.execute (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:245810)
at e.fn (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:300964)
at https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290550
at n.run (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290835)
at n.execute (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:289470)
I reset it and tried "run tests" again without changing anything, and it said the Example Exercise was answered correctly. So I began filling in my answers again one by one, checking the "run tests" after each one. When exerciseOne and exerciseTwo are completed there is no problem, it says that both of them and the exampleExercise are all answered correctly. Once I filled out exerciseThree and/or exerciseFour I get the same error message that every exercise is answered incorrectly, including the example. Here are the other error messages:
ReferenceError: exerciseOne is not defined
at eval (eval at n.evaluate (https://repl.it/public/replbox_lang/2.20.0/javascript.js:237:152404), :9:5)
at https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290616
at n.run (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290835)
at n.execute (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:289470)
at e.M [as queueRunnerFactory] (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:250740)
at e.execute (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:245810)
at e.fn (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:300964)
at https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290550
at n.run (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290835)
at e (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290094)
ReferenceError: exerciseTwo is not defined
at eval (eval at n.evaluate (https://repl.it/public/replbox_lang/2.20.0/javascript.js:237:152404), :14:5)
at https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290616
at n.run (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290835)
at n.execute (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:289470)
at e.M [as queueRunnerFactory] (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:250740)
at e.execute (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:245810)
at e.fn (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:300964)
at https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290550
at n.run (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290835)
at e (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290094)
ReferenceError: exerciseThree is not defined
at eval (eval at n.evaluate (https://repl.it/public/replbox_lang/2.20.0/javascript.js:237:152404), :19:5)
at https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290616
at n.run (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290835)
at n.execute (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:289470)
at e.M [as queueRunnerFactory] (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:250740)
at e.execute (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:245810)
at e.fn (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:300964)
at https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290550
at n.run (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290835)
at e (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290094)
ReferenceError: exerciseFour is not defined
at eval (eval at n.evaluate (https://repl.it/public/replbox_lang/2.20.0/javascript.js:237:152404), :24:5)
at https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290616
at n.run (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290835)
at n.execute (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:289470)
at e.M [as queueRunnerFactory] (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:250740)
at e.execute (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:245810)
at e.fn (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:300964)
at https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290550
at n.run (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290835)
at e (https://repl.it/public/replbox_lang/2.20.0/javascript.js:684:290094)
The comments says "// fibonacci sequence: 1 2 3 5 8 13 ......"
But the fibonacci sequence is: 1,1,2,3,5,8,13,21,34,55,89,144,....
This throws off the test cases included by 1.
I have fixed the issue on my clone and can submit a pull request.
Please see pull request ##1262
https://github.com/LambdaSchool/Precourse/tree/master/Lesson5-JS-II#undefined-and-null
let phoneNumber = '123-456-7890';
phoneNumber = null;
phoneNumer; // null
Should be phoneNumber; // null
https://github.com/LambdaSchool/Precourse/tree/master/Lesson5-JS-II#comparison-operators-continued
1 > 2; // alse
should be 1 > 2; // false
https://github.com/LambdaSchool/Precourse/tree/master/Lesson6-JS-III#length
const studentsNames = ['Dan', 'Maria', 'Sara', 'Raj'];
console.log(studentNames.length); // 4
Should be console.log(studentsNames.length)
https://github.com/LambdaSchool/Precourse/tree/master/Lesson6-JS-III#accessing-items-in-an-array
const studentsNames = ['Dan', 'Maria', 'Sara', 'Raj'];
console.log(studentNames[1]); // 'Maria'
Should be console.log(studentsNames[1]); // 'Maria'
const studentsNames = ['Dan', 'Maria', 'Sara', ... ,'Raj'];
console.log(studentNames[studentNames.length - 1]); // 'Raj'
Should be console.log(studentNames[studentsNames.length - 1]); // 'Raj'
https://github.com/LambdaSchool/Precourse/tree/master/Lesson6-JS-III#assignment
const studentsNames = ['Dan', 'Maria', 'Sara', 'Raj'];
studentNames[0] = 'Ryan';
console.log(studentNames); // ['Ryan', 'Maria', 'Sara', 'Raj']
Should be:
const studentsNames = ['Dan', 'Maria', 'Sara', 'Raj'];
studentsNames[0] = 'Ryan';
console.log(studentsNames); // ['Ryan', 'Maria', 'Sara', 'Raj']
https://github.com/LambdaSchool/Precourse/tree/master/Lesson6-JS-III#push--pop
const studentsNames = ['Dan', 'Maria', 'Sara', 'Raj'];
studentNames.push('Ryan');
console.log(studentNames); // ['Dan', 'Maria', 'Sara', 'Raj', 'Ryan']
Should be:
const studentsNames = ['Dan', 'Maria', 'Sara', 'Raj'];
studentsNames.push('Ryan');
console.log(studentsNames); // ['Dan', 'Maria', 'Sara', 'Raj', 'Ryan']
&
const studentsNames = ['Dan', 'Maria', 'Sara', 'Raj'];
studentNames.pop();
console.log(studentNames); // ['Dan', 'Maria', 'Sara']
Should be:
const studentsNames = ['Dan', 'Maria', 'Sara', 'Raj'];
studentsNames.pop();
console.log(studentsNames); // ['Dan', 'Maria', 'Sara']
https://github.com/LambdaSchool/Precourse/tree/master/Lesson6-JS-III#unshift--shift
const studentsNames = ['Dan', 'Maria', 'Sara', 'Raj'];
studentNames.unshift('Ryan');
console.log(studentNames); // ['Ryan', 'Dan', 'Maria', 'Sara', 'Raj']
studentNames.shift();
console.log(studentNames); // ['Dan', 'Maria', 'Sara', 'Raj']
Should be:
const studentsNames = ['Dan', 'Maria', 'Sara', 'Raj'];
studentsNames.unshift('Ryan');
console.log(studentsNames); // ['Ryan', 'Dan', 'Maria', 'Sara', 'Raj']
studentsNames.shift();
console.log(studentsNames); // ['Dan', 'Maria', 'Sara', 'Raj']
https://github.com/LambdaSchool/Precourse/tree/master/Lesson6-JS-III#for-loops
const studentsNames = ['Dan', 'Maria', 'Sara', 'Raj'];
for (let i = 0; i < studentNames.length; i++) {
console.log(studentNames[i]);
}
Should be:
const studentsNames = ['Dan', 'Maria', 'Sara', 'Raj'];
for (let i = 0; i < studentsNames.length; i++) {
console.log(studentsNames[i]);
}
https://github.com/LambdaSchool/Precourse/tree/master/Lesson7-JS-IV#the-this-keyword
userSaysHi: function(){
console.log( this.username + ' says hi!');
},
};
user.usersaysHi(); // 'dan.frehner says hi!'
Should be user.userSaysHi(); // 'dan.frehner says hi!'
https://github.com/LambdaSchool/Precourse/tree/master/Lesson8-JS-V#prototype
function User(name, github) {
this.name = name;
this.github = github;
}
User.prototype.introduction = function(){
return 'My name is ' + this.name + ', my github handle is ' + this.github + '.';
}
let dan = new User('Dan', 'tetondan');
let riley = new Cat('Riley', 'rileyriley');
console.log(dan.introduction()); // My name is Dan, my github handle is tetondan.
console.log(riley.introduction()); // My name is Riley, my github handle is rileyriley.
Should be let riley = new User('Riley', 'rileyriley');
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.