- It creates a brand new object.
- The new object gets linked to the function's prototype.
- The new object gets passed into the function call as
this
. - The function call returns
this
.
It is a function call with the new
keyword in front of it.
import React from "react"; | |
const callAll = (...fns) => (...args) => fns.forEach(fn => fn && fn(...args)); | |
class Chat extends React.Component { | |
static defaultProps = { | |
handleClick: () => console.log("Let's Chat"), | |
stateReducer: (state, changes) => changes | |
}; | |
initialMood = "Curious"; |
``` | |
lsof -n -i PORT | |
``` |
# Flip Cards | |
cards = Container.children.filter (child) -> | |
child.name == "Card1" || | |
child.name == "Card2" || | |
child.name == "Card3" || | |
child.name == "Card4" | |
for card in cards | |
this
.this
.It is a function call with the new
keyword in front of it.
The notion of constant time means that the operation will always complete in one compute cycle no matter how large the data structure grows to be.
const array = [1,2,3,4,5]
const theLastElemenet = array[array.length - 1] // O(1)
const hashMap = {hello: "world"}
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name="author" content="" /> | |
<meta name="viewport" content="width=device-width"> | |
<title>Box Style Change</title> |
The SSL protocol was implement by Netscape back in the day to facilitate commerce over the internet. E-commerce, as it became known as, required encryption to ensure that customer's personal information was kept safe, and the proper authentication and integrity guarentees were in place.
When SSL is used correctly, a third party cannot read or modify any of the actual data sent over the connection.
The TLS protocol is designed to provide three services to all applications running above it:
The Transmission Control Protocol (TCP) was designed to be courteous to the different traffic uses on a network. This notion is at the heart of what makes TCP so reliable, even in the face of competing demands for resources on the poorest of networks.
What makes TCP so reliable? Under the hood, TCP implements a concept called the congestion window. The congrstion window is the number of packets the sender can transmit over the wire until it receives an acknowledgment from the receiver. For example, if we set the congestion window to 1, the sender could send 1 packet to the reciever, then it would have to wait to recieve an acknowledgment. Only then could it send a second packet.
This attack works by including malicous code, usually a link, in a website that accesses another site the user is believed to be authenticated with. If that user session is still authenticated, the attacker may execute unauthroized commands.
Most web applications store session data in a cookie. Browsers will automatically send the cookie on every request to a domain, if it can find the cookie for the domain. The catch is that if the request comes from a different domain, the browser will still send along the cookie.