Notes, summaries, assignments, exams, and problems for Baccalaureate

Setting Up a Backend Project with Node.js

Computer science5.14 KB

To start a backend project.

- npm init

Then make a file with whatever entry point you named it as, for example, server.js

Once package.json is created:

  • npm i <package>
  • connect-mongo (store sessions in DB)
  • dotenv (for config files, environment variables)
  • express
  • mongoose
  • express-sessions (sessions and cookies)
  • method-override (to use PUT, UPDATE, DELETE requests)
  • moments (date formatting)
  • morgan (logging)
  • passport (authentication)

npm i -D <package>

  • nodemon (Update every file change instantly without having to restart the server)
  • cross-env (To update environment variables in script definition itself)

After installing the dependencies, edit the scripts in package.json

"start": "cross-env NODE_ENV=production node server.js",
"dev": "cross-env NODE_ENV=
...
Continue reading "Setting Up a Backend Project with Node.js" »

Key English Collocations, Idioms, and Phrasal Verbs

Teacher training9.18 KB

Mastering English Vocabulary and Grammar

Common Verb Collocations

  • Make: progress, money, suggestions, sense, a reaction, a choice, competition, an appointment
  • Take: part, action, achievement, place, a rise, an effort, one’s time, responsibility, age
  • Raise: a solution, issues, money, one’s voice, a question, an award, children, awareness, a price, doubt

Essential Idiomatic Expressions

  • Move with the times: to adapt to current trends
  • Have you on the edge of your seat: something that is very exciting or suspenseful
  • His mind is made up: he has decided firmly
  • Dead-end job: a job with no prospects for advancement
  • Get your foot in the door: to get started in a new career or organization
  • Make a living: to earn enough money to live
  • Tricks of the trade: clever
...
Continue reading "Key English Collocations, Idioms, and Phrasal Verbs" »

English Phonetics: Diphthongs and Consonants

Geology4.1 KB

Diphthongs

Described as vowel glides, since in their production the tongue begins in one place and moves to another. This movement of the tongue, however smooth, results in a change of vowel quality, which is why diphthongs are sometimes looked upon as 'combinations of 2 vowels'.

Diphthongs are usually classified according to whether they are:

  • Falling or rising
  • Wide or narrow
  • Front or back
  • Closing or centering

The diphthongs of RP are all stressed on the first element, described as falling. Those stressed on the finishing point (rising), can also be wide or narrow, according to the movement of the tongue from the first to the second target. Those in which the position of the tongue body changes quite noticeably are described as 'wide diphthongs'....

Continue reading "English Phonetics: Diphthongs and Consonants" »

English Vocabulary and Grammar

Medicine and health sciences2.45 KB

Vocabulary

1.

  • basement = sótano
  • orden sth online = pedir algo por internet
  • a can of soup = una lata de sopa
  • aim = objetivo
  • seize the day = aprovecha el día
  • to throw litter = tirar a la basura
  • health care = cuidado de la salud
  • a swimming cap = un gorro de piscina
  • economic growth = crecimiento económico

2.

  • 1. am having (1)
  • 2. don't look (2)
  • 3. does she have (2)
  • 4. are you looking (1)
  • 5. hate (1)

3.

  • outgoing = fiestero
  • fleece = forro polar
  • mittens = manoplas
  • sensitive = sensible
  • sth fits you = algo que te queda bien
  • short-sighted = miope
  • understanding = comprensible
  • get changed = cambiarse
  • bangles = pulseras

4.

  • muffins C
  • cabbage U
  • sauce U
  • leuce C
  • meat U
  • steak C
  • jam U

6.

  • watching (1)
  • to go (2)
  • training (1)
  • playing (1)
  • to sing (2)

7.

  • 6-7-5-4-3-1-2
  • score
  • win
  • lose/keep
  • came/beat
  • broke

8.

  • 4-5-
...
Continue reading "English Vocabulary and Grammar" »

The Cold War: Origins, Ideologies, and Global Impact

History3.1 KB

The Cold War: An Overview

The Rise of Two Power Blocs

The Second World War dramatically reshaped global politics. In 1945, the Allied forces, led by the US, Soviet Union, Britain, and France, defeated the Axis powers. This victory led to the emergence of two dominant powers: the US and the USSR. These powers gradually formed two opposing blocs: the Western camp, led by the US, and the Eastern camp, led by the USSR. For the first time, global politics became organized along ideological lines, with the US representing liberal democracy and the USSR championing socialism and communism.

A New Kind of Warfare

The Cold War differed from previous wars because it lacked direct military conflict between the US and the USSR. Instead, it was an ideological...

Continue reading "The Cold War: Origins, Ideologies, and Global Impact" »

Programmer Position Application and Gone Girl Novel Review

Mathematics2.67 KB

Programmer Position Application

Dear Mr. Gilhooley,

I am writing to apply for the programmer position advertised on your website/in the Times Union on 25 January. As requested, I am enclosing a completed job application, my certification, my resume, and three references.

The opportunity presented in this listing is very appealing to me, and I believe that my strong technical experience and education will make me a very competitive candidate for this position and an asset to your organization. The key strengths that I possess for success in this position include:

  • I have been in charge of 23 people in private banking.
  • I strive for continued excellence.
  • I provide exceptional contributions to customer service for all customers.
  • I am a conscientious person
...
Continue reading "Programmer Position Application and Gone Girl Novel Review" »

Essential Geometry and Algebra Glossary

Mathematics4.71 KB

Geometry

Angles

Adjacent angles - that have a common vertex and side, but no common interior points

Angle - formed by two rays with a common endpoint called the vertex

Complementary angles - whose measures add up to 90°

Congruent angles - that have the same measure

Supplementary angles - two angles whose measures add up to 180°

Vertical angles - the nonadjacent angles formed by two intersecting lines

Lines

Midpoint - the point that divides a segment into two congruent segments

Parallel lines - in a plane that never meet

Perpendicular lines - that intersect at 90° angles

Transversal - a line that intersects any two or more other lines

Triangles

Triangle Inequality Theorem - the sum of the lengths of any two sides of a triangle is greater than the length...

Continue reading "Essential Geometry and Algebra Glossary" »

Linear Programming Constraints and Variables: Definitions and Effects

Design and engineering2.44 KB

Binding Constraint: LHS equals to RHS at optimal ;  Non-binding constraint: LHS is not equal to RHS at optimal

Shadow Price: Amount by which OFV changes if RHS is increased by one unit

Basic Variable: A decision variable which has non-zero value at optimal ;  Non-basic Value: A decision variable which has a value of zero at optimal

Reduced cost: Amount by which the objective function coefficient needs to be decreased before the variable becomes basic

  • Basic var: "Final Value" >0 and "Reduced cost"=0; With allow inc/dec, optimal solution (Final Value) doesn't change, OFV change by (change)*(Final Value); Beyond allow inc/dec, optimal solution and OFV changes by RESOLVE.
  • Non basic var:  "Final Value"=0 and "Reduced cost"≠0; In a MIN,"Reduced
...
Continue reading "Linear Programming Constraints and Variables: Definitions and Effects" »

Understanding Networks: Advantages, Disadvantages, and Types

Computer science4.55 KB

Introducing Networks

A network is created when more than one device is connected together. A network can be a small collection of computers connected within a building (e.g. a school, business, or home) or it can be a wide collection of computers connected around the world.

Advantages

  • Communication – it is easy (and often free) to communicate using email, text messages, voice calls, and video calls.
  • Roaming – if information is stored on a network, it means users are not fixed to one place. They can use computers anywhere in the world to access their information.
  • Sharing information – it is easy to share files and information over a network. Music and video files, for instance, can be stored on one device and shared across many computers, so
...
Continue reading "Understanding Networks: Advantages, Disadvantages, and Types" »

Spanish Theater: Early 20th Century Trends and Authors

Latin3.17 KB

Spanish Theater in the Early 20th Century

The Second Decade: Noucentisme

During the second decade, the theater exhibited Noucentista characteristics: rationalism, anti-romanticism, a preference for classical and intellectualized expression of emotions, a defense of pure art, and works directed towards a knowledgeable, sophisticated audience. There was extreme concern for the design, structure, and language of the work.

Leading Authors of the Second Decade

  • Ramon del Valle-Inclán: In his primitive stage, he wrote works like Romance of Wolves and Eagle Crest. Their common features are violence, cruelty, brutality, destruction, passion, myths, and superstitions. There are plenty of marginal and strange beings. During his time of artificial distancing,
...
Continue reading "Spanish Theater: Early 20th Century Trends and Authors" »