Databases, Shell, Grep, Sed, Awk, Bash, Git From the Bottom Up - Mastering, Distributed and Interesting Architectures, Python, TwineTools: React, Redux, Flow, Webpack Ecosystem, React-Router v14, Search, Databases, ElasticSearch, Postgres, B-Trees, D...

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

name~10

A commit's nth ancestor is referenced using a tilde (~) followed by the ordinal number. this type of usage is common with rebase -i

React-Router v14: React-Router is broken into three things what are they?

React-router, react-router-dom, react-router-native

name^ in git

the parent of any commit is referenced using the caret symbol. if a commit has more than one parent, the first is used.

what react function is called to create an element in react

React.createElement();

7

0111

0000

0x0

0001

0x1

0010

0x2

0011

0x3

0100

0x4

What is the unspecified address in IPv6?

::

What is a page?

A fixed-length contiguous block of virtual memory.

Write allocate

write allocate means on a write miss, to allocate the block from memory to cache, then write to the cache.

Name 4 different ISAs

x86, MIPS, ARM, SPARC

Singlecycle architecture vs multicycle architecture?

What does steady state mean here...?

Pete Hunt "Rethinking Best Practices" : Djikstra says...

"Our intellectual powers are rather geared to master static relations and our powers to visualize processes evolving in time are relatively poorly developed"

Natural: Signs of a LSE HB? (6)

* highly manipulative * aggressive or passive-aggressive * LOVES drama/gossip * lots of shit tests, but more importantly NO BOUNDARIES on shit tests * victim mentality - "Poor me, poor me" (therapy conversion) * dichotomous signals * SH: overcompensation

Natural: Signs of a HSE HB? (6)

* positive influence, less drama * has good relationships * if you treat them well, they will treat you well * takes compliments WELL, doesn't overcompensate

down quark charge

-1/3e

What does -xe do for Bash?

-e -> exit immediately -x -> print commands and arguments as they are executed.

Prove that red-black trees have a guaranteed height of 2log_2(n+1)

0

What numbers have 1s aligned from right to left?

1, 3, 7, 15

What do threads maintain on its own to allow it to exist and run independently (Name 5)

1. Stack pointer 2. registers 3. scheduling properties - pthread_setschedparam, pthread_getschedparam 4. set of pending and blocked signals - sigpending 5. thread specific data. - pthread_key_create

Explain declarative Programming: 1. A program that describes ___ and not ___ 2. Any programming languages that lacks ___ 3. A language with clear correspondence to ___

1. What computation should be performed, not how. 2. Side effects (i.e. referential transparency) 3. Mathematical Logic

11

1011

0xB

1011, 11

0xB

11

0xC

1100

0xC

1100, 12

0xD

13

0xE

14

0xF

15

Moore's Law

1965, # of transistors placed on integrated circuit doubles every two years.

How Long is a MAC address?

48 bits or 6 octets.

STAT244: seq(5,9) can also be written how in R?

5:9

What number has two 1s in the middle

6

Why are IP addresses limited to 255 in Ipv4

8 bits 2^8-1 = 255

What does a R-B tree offer that a BST doesn't?

A BST can be severely unbalanced and degrade to a linked list.

What is a process really?

A process is an instance of a running program (PROFOUND IDEA IN CS)

What is a seg fault really?

A segfault is really just a page fault that is unable to recover because its unable to get the actual page due to invalid address. SIGSEGV.

Why can creating an index interfere with regular operation of a database?

A table is locked when indexed against.

Describe tokenizer, lexer, parser and how they relate. For example: int x = 5;

A tokenizer breaks a stream of text into tokens, usually by looking for whitespace (tabs, spaces, new lines). A lexer is basically a tokenizer, but it usually attaches extra context to the tokens -- this token is a number, that token is a string literal, this other token is an equality operator. A parser takes the stream of tokens from the lexer and turns it into an abstract syntax tree representing the (usually) program represented by the original text.

If we query www.google.com what type of record do we get back?

AAAA record (Quad-A(address) record))

AND Gate?

AND Gate?

Name the main states for both active and passive openers in the 3-way handshake.

Active: CLOSED -> SYN_SENT -> ESTABLISHED Passive: CLOSED -> LISTENING -> SYN_RCVD -> ESTABLISHED

list.append(x)

Add an item to the end of the list. Equivalent to a[len(a):] = [x].

ADD, ADDS

Add two things, set condition flags as necessary for (ADDS)

Main components of CPU?

Arithmetic Logic Unit (ALU), Control Unit (CU), Cache

What are conductors?

Atoms and molecules composed. But each has positively charged nucleus and negatively charged electrons around. Negatively charged electrons CAN move around freely between atoms. Charges can go to the edges when extra negative charge is added. Negatives will repel so they want to go to the edges.

When you run $ls with systems in a bash shell who is the default parent of that process?

Bash via fork() and execvp() or similar.

Difference between Promise.prototype.resolve and resolving within the executor function?

Both return Promises themselves -- need to figure this one out.. Some believe it to be syntactic sugar.

Execution time of an instruction formula:

CPI * Time per cycle (clockcycle)

Give four spine parts from top to bottom

Cervical Thoracic Lumbar Sacral

What are the three types of cache misses?

Cold miss, Conflict miss, capacity miss.

What are two applications of the Gayle-Shapley Stable Matching algorithm?

College admissions, Hospital-patient matching

What is a DDL?

Data definition language

Pete Hunt "Rethinking Best Practices" : React Components should only contain ___ (2 words)

Display Logic

How are faults handled?

Either returns to current instruction or aborts.

What are faults?

Faults are unintentional but possibly recoverable

How many Mac Addresses does a 802.11 frame have?

Four

Pete Hunt "Rethinking Best Practices" : PH describes a React Component as... "A ____ building block for UIs ___ with other components" (4 words)

Highly cohesive, loosely coupled.

418 status code means?

I'm a teapot

Spatial locality?

If a particular storage location is referenced at a particular time it is likely that nearby memory locations will be referenced in the near future.

Temporal locality?

If at one point a particular memory location is accessed, it is likely that the same location will be accessed again in the near future.

What are priority queues?

In a priority queue, an element with high priority is served before an element with low priority. Every element has a priority assigned to it.

Where do we see a similar pattern to page faults?

In caches.

Regression Analysis: Null Hypothesis

In inferential statistics, the term "null hypothesis" is a general statement or default position that there is no relationship between two measured phenomena, or no association among groups.[1] Rejecting or disproving the null hypothesis—and thus concluding that there are grounds for believing that there is a relationship between two phenomena (e.g. that a potential treatment has a measurable effect)—is a central task in the modern practice of science; the field of statistics gives precise criteria for rejecting a null hypothesis. The null hypothesis is generally denoted H_o

Orphan processes are adopted by which process

Init or like process of PID 1(systemd) by reparenting.

CLRS mentions to prove 3 properties of loop invariants, what are they?

Initialization: It is true prior to the first iteration of the loop. Maintenance: If it is true before an iteration of the loop, it remains true before the next iteration. Termination: When the loop terminates, the invariant gives us a useful property that helps show that the algorithm is correct.

JSX vs JS

JSX allows valid HTML markup. JS rin React requires JS functions that look HTML-like and ouputs HTML ``` return(div(null, MyTitleFactory({title:"propsarecool, color="peru"}))); return (<div><My Title title="props are cool' color="peru"</div>) ```

So waht is a context switch really?

Just a CPU/Registers changing the memory values and the egister alues for a porcess.

Explain Least Squares Regression

LSR is sum of the errors. e_i = yi^ - yi. Minimize sum of e_i squared. Where we square residuals to ignore sign.

Natural: What is LMD?

Last minute doubt

What are the PDUs of each of the first 4 layers of the OSI model?

Layer 1 - Bit, Symbol Layer 2 - Frame Layer 3 - Packet Layer 4 (UDP) - Datagram Layer 4 (TCP) - Segment

ELM: FEM - How do I create local variables in ELM?

Let... in.. construct

What is a HEAD Request used for?

Like GET, but you can just get back the headers not the payload.

Osho thinks of a ladder of rungs what are the rungs?

Lowest - Instinct, Middle - Intellect, Highest - Instuition -- They are all primordial attributes.

What is Instruction Level Parallelism?

Measure of instructions that can be ran in parallel - "Increase ILP with OOO or pipelining"

Describe the serratius anterior

Mucles that originate on surface of 1st to 8th ribs.

How can you convert a max-heap into a min-heap?

Negate all the values

Give some examples of arity

Nullary, unary, binary, ternary, n-ary

What is the guaranteed height on a balanced search tree?

O(log(n)) for n items. Specifically, 2log_2(n+1)

Injective functions are...

One to One and distinct.

What does context switching have to do with concurrency?

Parallel is the opposite of serial. Concurrent is the opposite of sequential. Vector is the opposite of scalar. Thus, concurrency is often shown via context switching between processes.

What are the three mutually exclusive states of promises?

Pending. Fulfilled. Rejected.

Looks give what

Permission

What are two ways a STA can associate w/ AP in 802.11?

Probes or Beacon Frames

What is Quantization?

Quantization is the procedure of constraining something from a continuous set of values (such as the real numbers) to a relatively small discrete set (such as the integers).

Protons and neutrons, other hadrons are composed of what?

Quarks

CS239 DVIS: RGB vs HSL vs HCL vs HSV?

Red Green Blue HSL - Hue saturation light HCL - Hue Chroma Luminance HSV - Hue saturation value

What are the Unix File types? (7 excluding Door including two of device files)

Regular: - Directory : d Symbolic link: l Named Pipe: p Socket: s Device file: c(haracter), b(lock)

list.clear()

Remove all items from the list. Equivalent to del a[:].

What's the opposite of combinational logic?

Sequential logic.

REST says what about protocols? and client v server?

Should be stateless. There should be a separation of concern between Client ansd Server?

Producer-consumer pattern

Someone is generating data and at the other end someone is receiving data, using a common, fixed-size buffer.

list.sort(key=None, reverse=False)

Sort the items of the list in place (the arguments can be used for sort customization, see sorted() for their explanation).

Smaller transistors do what better?

Switch faster!

What does execve() do?

System call (trap)

What does fork() do?

System call (trap) (TODO)

What is TLS?

TLS is encrypting payload and not header?

Tali Garsiel Vimeo Video:

TODO

Pete Hunt "Rethinking Best Practices" : "Templates separate ___ and not ____"

Technologies concerns

Pete Hunt "Rethinking Best Practices" : Accessibility of ___, power of ___ (2 words total)

Templates, Javascript

When thinking about inversions what does it really imply?

That an inverse multiplied by its inverse is the identity or unit.

Who sends the first syn in a 3-way handshake?

The active opener.

What is a socket?

The combination of an IP address and a port.

What is cohesion in computer science?

The degree to whcih elements of a module belong together.

Ayurveda

The central theoretical ideas of Ayurveda developed in the mid-first millennium BCE, and show parallels with Sāṅkhya and Vaiśeṣika philosophies and with Buddhism and Jainism.[27][28] Balance is emphasized, and suppressing natural urges is considered unhealthy and claimed to lead to illness.[19] For example, to suppress sneezing is said to potentially give rise to shoulder pain.[29] However, people are also cautioned to stay within the limits of reasonable balance and measure when following nature's urges.[19] For example, emphasis is placed on moderation of food intake,[30] sleep, and sexual intercourse.[19] Ayurveda names seven basic tissues (dhatu), which are plasma (rasa), blood (rakta), muscles (māmsa), fat (meda), bone (asthi), marrow (majja), and semen (shukra). Like the medicine of classical antiquity, Ayurveda has historically divided bodily substances into five classical elements (Sanskrit [maha]panchabhuta, viz. earth, water, fire, air and ether.[31] There are also twenty gunas (qualities or characteristics) which are considered to be inherent in all substances. These are organized in ten pairs of antonyms: heavy/light, cold/hot, unctuous/dry, dull/sharp, stable/mobile, soft/hard, non-slimy/slimy, smooth/coarse, minute/gross, and viscous/liquid.[32] Ayurveda also names three elemental substances, the doshas (called Vata, Pitta and Kapha), and states that a balance of the doshas results in health, while imbalance results in disease. One Ayurvedic view is that the doshas are balanced when they are equal to each other, while another view is that each human possesses a unique combination of the doshas which define this person's temperament and characteristics. In either case, it says that each person should modulate their behavior or environment to increase or decrease the doshas and maintain their natural state. In medieval taxonomies of the Sanskrit knowledge systems, Ayurveda is assigned a place as a subsidiary Veda (upaveda).[33] Some medicinal plant names from the Atharvaveda and other Vedas can be found in subsequent Ayurveda literature.[34] The earliest recorded theoretical statements about the canonical models of disease in Ayurveda occur in the earliest Buddhist Canon.[35]

What part of IPv6 is the host?

The second set of 64 bits is the host. This is nice because MAC addresses are unique and 48 bits, so can fit in nicely with extra space.

CSS transforms when used in percentages calculate what size?

The size of the bounding box (the box that the elemnt is in)

Architecture vs Microarchitecture?

The term architecture is used here to describe the attributes of a system as seen by the programmer, i.e., the conceptual structure and functional behavior, as distinct from the organization of the data flow and controls, the logical design, and the physical implementation.

What does a horizaontal regression line mean?

There is no relationship between the predictor and the response.

What is the minimum # of distinct mac address fields in 802.11? Why?

Three. You need to go through an AP to get to the receiver. SRC->AP->DST

What class of exceptions are system calls?

Traps.

D3 FEM: How do you d3.select(<nonexistingel> and add elements?

Use the Enter-Append method.

What do write allocate and no write allocate reference?

What to do on a write miss.

When would we need 4 MAC addresses in 802.11?

When APs need to communicate wirelessly.

What is a hard and fast rule for system call error handling?

YOU MUST check the return status of every system-level function. Only exception is the handful of functions that return void. if ((pid = fork()) < 0){ print error. exit(0); }

Are A and B Concurrent?

Yes! Concurrent: A & B, A & C Sequetional: B & C

Is an I/O Interrupt synchronous or async?

async -- external to the processor.

Mission is...

first. always.

The Natural: HSE

high self esteem

The Natural: HSD

high sex drive

What is another term for little endian?

host byte order

react elements are what functional concept?

immutable

What are traps?

intentional exceptions caused by instructions (breakpoints, system calls, etc)

David Deida - Way of the Superior Man (Chapter 1, 16:57) - When we identify with consciousness we are ... when with the life force of the world we feel the ...

masculine, feminine

for (int i = 0; i < 10; i++) { Console.WriteLine(i); } for (int i = 0; i < 10; ++i) { Console.WriteLine(i); } any difference in output here?

no

WU rules

no drinking no making out within the first 10 mins esp when requested

Complexity of the 802.11 medium?

the medium is shared (add more)

Protons have what quark composition?

uud

codomain vs range

what can go into a function is the domain. what may come out is the codomain. what actually comes out is the range.

What is an aggregate function?

In database management an aggregate function is a function where the values of multiple rows are grouped together as input on certain criteria to form a single value of more significant meaning or measurement such as a set, a bag or a list.

Redux: dispatch(action)

Only way to trigger a state change

Description and opposite of extension - examples

Opposite of extension is flexion: Extension is increasing the angle between two body parts. When standing up, the knees are extended.

Redux: action creators

functions that create actions.

Compare and contrast generators and iterators?

https://stackoverflow.com/questions/1022564/what-is-the-difference-between-an-iterator-and-a-generator Generators are iterators, but not all iterators are generators. An iterator is typically something that has a next method to get the next element from a stream. A generator is an iterator that is tied to a function.

$w does what?

w -- display who is logged in and what they are doing

What is SOA?

A service-oriented architecture (SOA) is a style of software design where services are provided to the other components by application components, through a communication protocol over a network. The basic principles of service-oriented architecture are independent of vendors, products and technologies.[1] A service is a discrete unit of functionality that can be accessed remotely and acted upon and updated independently, such as retrieving a credit card statement online. A service has four properties according to one of many definitions of SOA:[2] It logically represents a business activity with a specified outcome. It is self-contained. It is a black box for its consumers. It may consist of other underlying services.[3]

In adobe XD what makes a symbol a symbol obvious?

Green bounding box

React-Routerv14: Router components expect how many children?

One... typically <App>

Tag

Tag is also a name for a commit similar to branch except that it always names the same commit.

Leg : Two major bones that are in between front calf muscles

Tibia, fibula

Complete vs Full Tree

* A full tree has all levels filled. * A complete tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible.

What are the types of synchronous exceptions?

* Traps * Faults * Aborts

Up Quark charge

+2/3e

Natural: ETC!!!!

-- boyfriend screening -- when was your last boyfriend? why did he break up with me? -- can you cook? (seed the pull) -- super hungry -- im too shy -- go on an adventure (seed the pull) -- only if youre cool -- only if youre nice -- why are you touching me -- sorry wasnt listening was lost in your eyes -- on rejection "call me" , "im too shy" -- lets get married -- hi my sister -- whos that? is that who you cheat on me with? -- no no we cant do this im too shy -- dont tell my girlfriend -- im a virgin -- where r u from. im from hell, heaven -- hes drunk -- grab others, do you approve? -- grab others, this is my sister -- shh

1101

0xD

How does insertion work in binary heaps?

1. Insert node into leftmost open leaf pos. 2. Compare node with parent, if in correct order, stop 3. If not, swap element and repeat #2-3

CLRS says there are two equivalent ways to implement a dp algo. Describe them.

1. Top-down w/ memoization 2. Bottom-up method

Characteristics of Charged Particles

1. Two varieties : +, -, like charges repel, unlike harges attract 2. Charge is quantized (see quantization) - Q = ne, e = 1.6*10^-19 3. Electric charge is conserved in a reaction.

Natural: girls have ... dudes hitting on them

A LOT attempting to be providers

@LearnReact (Medium) What are container compoents?

A container does data fetching and then redners its corresponding sub-components. This allows separation of data-fetching and rendering concerns.

What is a die in the context of circuits?

A die in the context of integrated circuits is a small block of semiconducting material, on which a given functional circuit is fabricated. Typically, integrated circuits are produced in large batches on a single wafer of electronic-grade silicon (EGS) or other semiconductor (such as GaAs) through processes such as photolithography Processor die is where the transistors making up the CPU actually reside.

Put shortly, what is a cookie? Name 3 things that a cookie contains.

A small text file stored on your browser: 1. name-value pair containing actual data 2. expiry date after whcih it is no longer valid 3. domain and path of server it should be served to

What are aborts?

Aborts are unintentional and unrecoverable synchronous exceptions. Examples: illegal instruction, parity error, machine check

Description and opposite of adduction - examples

Adduction refers to a motion that pulls a structure or part toward the midline of the body, or towards the midline of a limb. In the case of fingers and toes, it refers to bringing the digits together, towards the centerline of the hand or foot Dropping the arms to the sides, and bringing the knees together, are examples of adduction.

Why is IPv6 separated into two halves of 64 bits?

Allows for flexibility because then we can add MAC address as part of the host bits.

Working tree

Any directory on your fs which has a repo associated.

OSI Model

Application, Presentation, Session, Transport, Network, Data Physical

What is the Von Neumann model?

Architecture with instructions in memory i.e. stored program.

Why is array access O(1)?

Array access if O(1) because it constitutes to steps. First get the address of the array (beginning) then * num of elements and element size to get that address. (2 steps)

Why is Array Insertion O(n)?

Array insertion is O(n) because you first have to insert the element then need to move all elements after into their right spots. So, if you're inserting at the end it's actually O(1), in the middle O(n/2) and at the beginning O(n) but if you're inserting beyond the array allocated size (typically they're fixed) you would need to reallocate an array which is a slower separate O(n) operation.

The left, right child of a node of a binary heap represented as an array is where (1-index and 0-index)?

At 1-index, left child is at 2k, right is at 2k+1 At 0-index, left child is at 2k+1, right is at 2k+2.

Big Endian vs Little Endian

Big Endian Machine that stores the MSB Left to right Little Endian machine stores LSB right to left.

What is a control hazard/dependency?

Branching hazards (also termed control hazards) occur with branches. On many instruction pipeline microarchitectures, the processor will not know the outcome of the branch when it needs to insert a new instruction into the pipeline (normally the fetch stage).

the index

Changes are first registered into the index "staging area".

How to test for injective functions?

Charging argument or horizontal line test (should never pass two) -- preserves distinctiveness

Bijective functions are...

Combination of 1 to 1 and onto. Each element of one set is paired with exactly one element fo the other set and vice versa.

The Natural: Girl goes OUT of her way to help you is a ....

Comfort test

In 802.11, Frame Control has two bits ToDS, FromDS, bits are both = 0. What does that mean

Coming from a STA going to another STA on the same BSS. Other examples: To DS field is 1 and From DS field is 0 To DS field is 0 and From DS field is 1

What is tree-shaking?

Common JS term used to refer to dead-code elimination or more precisely, live-coe import

CBNZ CBZ

Compare and branch if nonzero Compare and branch if zero p435 Compare and branch if zero to a label at a PC-relative offset, without affecting the condition flags, and with a hint that this is not a subroutine call or return

What is a charging argument?

Compare output of an optimization algorithm to an optimal soluition -- to usually show existence of an injective function.

What is cooperative multitasking?

Cooperative multitasking, also known as non-preemptive multitasking, is a style of computer multitasking in which the operating system never initiates a context switch from a running process to another process. Instead, processes voluntarily yield control periodically or when idle in order to enable multiple applications to be run simultaneously. This type of multitasking is called "cooperative" because all programs must cooperate for the entire scheduling scheme to work. In this scheme, the process scheduler of an operating system is known as a cooperative scheduler, having its role reduced down to starting the processes and letting them return control back to it voluntarily.[1][2]

Coroutines wiki

Coroutines are computer program components that generalize subroutines for non-preemptive multitasking, by allowing multiple entry points for suspending and resuming execution at certain locations.

What is coupling in computer science?

Coupling is the degree to which each program module relies on each of the other modules.

What is the purpose of double fork()ing?

Creates a daemon process via adoption of process of pid1

CPI, IPC?

Cycles per instruction, Instructions per cycle

At what layer of the OSI model does 802.11 operate at?

Data-link layer, layer 2

What are five ways to resolve a flow dependency?

Detect and wait until value is available in register file ! Detect and forward/bypass data to dependent instruction ! Detect and eliminate the dependence at the software level " No need for the hardware to detect dependence ! Predict the needed value(s), execute "speculatively", and verify ! Do something else (fine-grained multithreading) " No need to detect

What are the 5 stages of a classic RISC pipeline?

IF, ID, Execute, Mem Access, Writeback

RIP, IS-IS, OSPF are protocols of ...

IGP (interior gateway protocols) which means within an AS.

How do forks relate to node promises when not chained?

If you chain asynchronous function calls via then(), they are executed sequentially, one at a time: asyncFunc1() .then(() => asyncFunc2()); If you don't do that and call all of them immediately, they are basically executed in parallel (a fork in Unix process terminology): asyncFunc1(); asyncFunc2(); So essentially you run asyncFunc1 and 2 concurrently when not chained.

What is locality of reference?

In computer science, locality of reference, also known as the principle of locality, is a term for the phenomenon in which the same values, or related storage locations, are frequently accessed, depending on the memory access pattern.

What is Dynamic Programming?

In mathematics, management science, economics, computer science, and bioinformatics, dynamic programming (also known as dynamic optimization) is a method for solving a complex problem by breaking it down into a collection of simpler subproblems, solving each of those subproblems just once, and storing their solutions - ideally, using a memory-based data structure. The next time the same subproblem occurs, instead of recomputing its solution, one simply looks up the previously computed solution, thereby saving computation time at the expense of a (hopefully) modest expenditure in storage space. (Each of the subproblem solutions is indexed in some way, typically based on the values of its input parameters, so as to facilitate its lookup.) The technique of storing solutions to subproblems instead of recomputing them is called "memoization".

Regression Analysis: What is a z-score?

In statistics, the standard score is the signed number of standard deviations by which the value of an observation or data point is above the mean value of what is being observed or measured. Observed values above the mean have positive standard scores, while values below the mean have negative standard scores. The standard score is a dimensionless quantity obtained by subtracting the population mean from an individual raw score and then dividing the difference by the population standard deviation. This conversion process is called standardizing or normalizing (however, "normalizing" can refer to many types of ratios; see normalization for more). Standard scores are also called z-values, z-scores, normal scores, and standardized variables. They are most frequently used to compare an observation to a standard normal deviate, though they can be defined without assumptions of normality.

What are cores?

Independent execution units tthat can run one program thread at a time in parallel with other cores. Think of a core as equivalent to a thread.

What does ISMP in algorithms stand for?

Interval scheduling maximization problem.

NAND Gate?

Inverter(NOT) + AND

NOR Gate?

Inverter(NOT) + AND

XNOR Gate?

Inverter(NOT) + XOR

Some proof of greeks and mind-body connection

It was commonly believed that the mind, body, and soul each had to be developed and prepared for a man to live a life of arete. This led to the thought that athletics had to be present in order to obtain arete. They did not need to consume one's life, merely exercise the body into the right condition for arete, just like the mind and soul would be exercised by other means. (ARETE)

How do different ISA's differ?

Opcodes - what Operands - who Instruction processing style - 3 addresses, 0 addresses? Instruction addressing modes # of registers I/O interface Instruction length, uniform/non-uniform decoding

Given routine 1 and routine 2, what property should they have to be able to execute w pthreads?

Organizable into discrete, independent tasks, that can execute concurrently. They should be able to be interchanged, interleaved, and or overlapped in real time.

What is $$ in Bash?

PID of current shell

Explain React.Copmonent(setState)

Performs a shallow merge of nextState into current state. This is the primary method you use to trigger UI updates from event handlers and server request callbacks. The first argument can be an object (containing zero or more keys to update) or a function (of state and props) that returns an object containing keys to update.

Downside of program/process isolation?

Programs can't share data with each other, but this is made possible by using the same mapping to allow programs to share data by pointing to same data (fonts, dialogs, etc)

How many calories are in Proteins, Carbs, Fats?

Proteins - 4 cals, Carbs - 4 calos, Fats - 9 cals

Level Order Traversal datastructure used?

Queue

What are the three types of data dependencies/hazards?

RAW - Flow WAR - Anti WAW - Output

What is RPC?

RPC (Remote Procedure Call) is like calling a function, only that it is present remotely on a different server as a service. A service exposes many such functions/procedure to its client. And client requires some way to know what are the functions/procedures exposed by this service and what are their parameters.

The Natural similar to what is said to Elliot Hulse

RSD: It is not what you say, but how you say it. EH: Successful people don't make the right decisions, they make their decisions right.

React Virtual DOM allows what..

React Native and cross-platform targeting pretty much.

Precision vs Recall Tradeoff - what is the precision and recall of the diagram?

Recall - 1/3 - 33% Precision - 1/4 - 25% In the example only 1 relevant result of 3 possible relevant results was returned, so the recall is a very low ratio of 1/3, or 33%. The precision for the example is a very low 1/4, or 25%, since only 1 of the 4 results returned was relevant. Basically precision - is what was returned relevant? recall - how many relevant things were returned? Full-text-search systems typically includes options like stop words to increase precision and stemming to increase recall.

What are the primary colours?

Red Yellow Blue

What are the secondary colours?

Red+yellow = orange Yellow+Blue = Green Blue+red = purple

list.remove(x)

Remove the first item from the list whose value is x. It is an error if there is no such item.

What are the 3 options for restarting after a system call?

Return to I_Current, Return to I_Next, Abort.

Pete Hunt "Rethinking Best Practices" : "Components are ___, ___, ___" (3 terms 4 words)

Reusable, composable, unit testable

Internal Rotation

Rotation of body parts is referred to as internal or external, referring to rotation towards or away from the center of the body.[20] Internal rotation (or medial rotation) refers to rotation towards the axis of the body.[20] External rotation (or lateral rotation) refers to rotation away from the center of the body.[20

What are the mac address fields in 802.11?

SA: source address - source of the data (MSDU) -> STA1 TA (Transmitter Address): STA that transmitted the frame -> STA1, AP1, AP2 RA (Receiver address): immediate recipient of the frame -> AP1, AP2, STA2 BSSID (Basic Service Set ID): Unique ID of BSS -> eg MAC of AP in finfra network -> AP1, AP2

kill signals: 1,2,15,18,19,20

SIGHUP : 1 - configure reload without termination; also used to report termination of controlling process SIGINT : 2 - cause program to terminate SIGQUIT : 3 - when a user requests to quit a process SIGKILL : 9 - immediately terminate process SIGTERM : 15 - send request to terminate process; request can be interpreted or ignored SIGCONT : 18 - restart previously stopped process SIGSTOP : 19 - stop a process for later resumption SIGTSTP : 20 - send by terminal to request a temporary stop

Combinational vs Sequential logic?

Sequential Logic: Compute their output based on input and state, and that the state is updated based on a clock. Combinational Logic: Combinational logic implement Boolean functions, so they are functions only of their inputs, and are not based on clocks.

Difference between set-cookie vs. Doucment.cookie?

Set-cookie is an HTTP Header of request. This request generated with document.cookie

Kyle Simpson mentions a trick to handle promises that don't resolve within a time, how do you do this?

SetTimeout, Promise.Race

What is Elm-Reactor?

Some IDE for easier ELM dev has support for time-travelling.

Describe the "Black Depth" of a red-black tree

The # of black nodes from root to a node is the node's "black depth"

What is __name__?

The __name__ attribute must be set to the fully-qualified name of the module. This name is used to uniquely identify the module in the import system. Global

The default cookie domain is...

The domain that set the cookie originally.

__filename is...

The file name of the current module. This is the resolved absolute path of the current module file. For a main program this is not necessarily the same as the file name used in the command line.

What is the difference between a half-adder and a full-adder?

The half adder takes in two inputs and puts out two outputs. The two inputs are the operands to sum up. The full-adder takes in three inputs where the third input is the carry in signal. Two outputs as well.

When an asynchronous exception occurs - what does the handler do?

The handler returns to the next instruction. e.g. timer interrupt (goes off every few ms). i/o interrupt from external device.

What is the height of a binary heap?

The height of a binary heap is always floor(log(n))

What is fe80::/10?

The link-local addresses (think about the terminology used here). Takes routing address as first 64 bits and MAC as next 64 (in a sense since MACs are 48), guaranteeing at least one address will work in the network.

Why must Load instructions stall one cycle even with data forwarding?

The necessary computed value is only available AFTER the MEM stage because in load you load FROM memory TO a register.

What is the "arity" of a function?

The number of arguments or operands that the function takes.

What is a user agent?

The piece of software that understands HTTP requests, typically used in the context of HTTP. In computing, a user agent is software (a software agent) that is acting on behalf of a user.

How does signal edging work?

The transition is what represents the signal. But only one of them - rising or falling represents

What is the purpose of the 6to4 mechanism?

This is intended to help migrate IPv4 to IPv6. CAn be used to drive IPv6 packets into an IPv4 network. IMPORTANT: 6to4 may be used by an individual host, or by a local IPv6 network. When used by a host, it must have a global IPv4 address connected, and the host is responsible for encapsulation of outgoing IPv6 packets and decapsulation of incoming 6to4 packets. So basically packs IPv6 packets into IPv4 and vice versa in a sense.

What is a query string?

Typically used with GET requests -- You encode the information that a client is sending to server using a querystring which usualyl has the form ?parameter=value&parametervalue&.... POST methods on the other hand are intended to affect resources and its parameters and values are tyically encoded in the request payload not in the URI.

What's bigger, category-wise?

URI is bigger, URL is spec or location of resource and must include scheme

What timezone are cookie expiry dates set in?

UTC (Greenwich)

David Deida - Way of the Superior Man (Chapter 1 07:48) - What are the three stages of masculine development?

Until fairly recently, modern roles for men and women were fixed and separated. Men were supposed to go out and earn money. Women were supposed to stay home and take care of the kids. Men often manipulated their women through physical and financial dominance and threat. Women often manipulated their men through emotional and sexual strokes and stabs. The typical and extreme caricatures of this previous time are the macho jerk and the submissive housewife. If you are reading this book, you have probably outgrown this first stage of sexual identity. Or at least you can smile about it. Next came (and is still coming) a stage in which men and women both sought to balance their inner masculine and feminine energies toward "50/50," becoming more like one another. For instance, in the United States in the 1960's, men began to emphasize their inner feminine. They learned to go with the flow. They let go of their rigid, one-dimensional masculine stance and embraced long hair, colorful clothes, nature, music, and a more carefree and sensual lifestyle, all means of embellishing or magnifying radiance, energy, and the abundant force of life—magnifying the feminine. Meanwhile, many women were doing just the opposite. They were magnifying their inner masculine, which, at the level of human character, appears as direction, or clarity of purpose, and vision. Women gained financial and political independence. They strengthened their careers, focused more on personal long term goals, went to school in increasing numbers for advanced degrees, and learned to be more assertive in their needs and desires. Chances are, if you are reading this book, you are more balanced than your parents were. If you are a woman, you are probably more independent and assertive than your mother was. If you are a man, you are probably more emotionally expressive and open-minded than your father was. Or, at least such qualities seem acceptable to you, even if you don't express them yourself. Remember, not that many years ago, a man who got his hair styled or a woman who wore a business suit was often considered suspect. It was a good thing, as time progressed, for men to embrace their inner feminine and women to embrace their inner masculine. They became less fragmented and more whole in the process. They became less dependent on each other: men could, indeed, change diapers, and women were completely capable of emptying the mouse traps. Macho men became more loose and feeling. Submissive housewives became more independent and directed. In terms of social roles, men and women became more similar. This was an improvement for everyone. But this 50/50 stage is only a second and intermediate stage of growth for men and women, not an endpoint. Side effects of xv THE WAY OF THE SUPERIOR MAN this trend toward sexual similarity can be seen as a major cause of today's unhappiness in intimacy. The trend toward 50/50 has resulted in economic and social equality, but also in sexual neutrality. Bank accounts are balancing while passions are fizzling out. Men are less macho while sex and violence continue to increase on TV and in the movies. Women are more in control of their economic destiny while they go in increasing numbers to therapists and doctors to cope with stress related disease. Why is this happening? In my workshops and consultations I hear independent and successful women complaining that many of today's men have become "wimps," too weak and ambiguous to really trust. Sensitive and affectionate men are complaining that many of today's women have become "ballbusters," too hardened and emotionally guarded to fully embrace. Is this the ultimate expression of human sexual wisdom and evolution, or is there another step to take? To answer these questions, we need to understand the nature of sexual passion and spiritual openness. Sexual attraction is based on sexual polarity, which is the force of passion that arcs between masculine and feminine poles. All natural forces flow between two poles. The north and south poles of the earth create a force of magnetism. The positive and negative poles of your electrical outlet or car battery create an electrical flow. In the same way, masculine and feminine poles between people create the flow of sexual feeling. This is sexual polarity.

How do you convert a binary heap into an array while still maintaining properties?

Use level order traversal into an array.

David Deida - Way of the Superior Man (Chapter 1 18:31) - Deida says we have very little practices for what in modern society?

We have very little practices for men to feel into their deepest purposes. Therefore most men begin to function from superficial desires. Instead we should source desires from divinity.

How do we know what to do given an exception?

We look into an exception table that holds the appropriate code.

Define Range, Codomain, Domain

What can go into a function is the domain. What can come out of a function is called the codomain. What actually comes out of a function is the range.

Natural(Betaization): where to place dates?

Where it's convenient for YOU.

D3 FEM: X,Y goes in which directions in D3?

X goes L->R Y goes Top to Bottom

Correlation Coefficient Range?

[-1,1]

STAT 244: in R what does this return? a <- c(1,2,3) a+1

[1]2,3,4

Postgres commands for - listing all databases, connecting/switching to a database, getting help, listing all tables

\list \dt \connect \?

React component names must start with

a capital letter

STAT244: in R, plot takes what args?

a vector for X and a vector for Y

STAT244: vectors in R are ___ type

all the same type

Beta male behavior is rewarded...

at mediocrity at best.

Without using arithmetic ops, how can you find array indices of a related node of a binary heap given a node index?

bit shifts rightshift for division of parent leftshift for left child and right child then add 1 for right

STAT244: How do you create a vector of 4,7,9 in R?

c(4,7,9)

Neutrons have what quark composition?

ddu

STAT244: Rs vectors are dynamic or fixed?

dynamic

Explain lsof -i

list open files Open files in the system include disk files, named pipes, network sockets and devices opened by all processes. One use for this command is when a disk cannot be unmounted because (unspecified) files are in use. The listing of open files can be consulted (suitably filtered if necessary) to identify the process that is using the files. The -i option selects the listing of files any of whose Internet address matches the address specified in i. If no address is specified, this option selects the listing of all Internet and x.25 (HP-UX) network files.

The Natural: LSD

low sex drive

STAT 244: In R how do you assign names to a barplot?

names(dataset) <- c ("england", "france", "nomery")

What is the system call used for new threads?

pthread_create()

PATCH request?

requests a set of changes described.

Coroutines are a type of...

subroutine.

What CSS property determines underlining text?

text-decoration

What is the heap property?

the min-heap property: the value of each node is greater than or equal to the value of its parent, with the minimum-value element at the root. the max-heap property: the value of each node is less than or equal to the value of its parent, with the maximum-value element at the root.

C right shifts are determined by...?

type of thing being shifted

What is a multiplexer? (MUX)

typically puts out 1 output given a bunch of inputs 2^n and selects one of these inputs as the output

Deida, Natural: What is your thing to give?

your love! your talents!

The Natural: Arousal buildup?

kino basically.. bite neck ear breathing grab waist pull in

According to Kyle Simpson, how does a Promise Instill Trust? Name 5 Key points

1. only resolved once 2. either success or error 3. messages passed or kept 4. exceptions beceome errors 5. immutable once resolved

Full Text Search has 3 steps in preprocessing in Postgres -- what are they?

1. parse document into tokesn 2. convert tokens into lexemes (normalization, stemming) 3. store preprocessed documents optimized for searching.

Redux: Actions are...

1. payloads of ___ that send ___ to __ 2. __ source of info for state 3. plain js objects 4. must have "type" property

What things does a process contain (Name 11)

1. pid, pgid, uid, gid 2. environment 3. working directory 4. program instructions 5. registers 6. stack 7. heap 8. file descriptors 9. signal actions 10. shared libraries 11. interprocess communications

Redux: reducers are what type of function, what args, what does it return? what are 3 things not to do with reducers

1. pure function 2. args: previous state, action 3. returns new state 4a-c - DONT mutate args, preform side-effects call non-pure functions

react elements vs components?

1. react elements describes what you see on the screen 2. react element is an object representation of a dom node a component is afunction or a class which optionally accepts input and returns a react element

0xA

10

What numbers have alternatings 1s and 0s?

10, 5

0x8

1000

8

1000

0x9

1001

9

1001

0xA

1010

10

1010

0xA

1010, 10

0xB

1011

0xD

1101

0xD

1101, 13

0xE

1110

0xE

1110, 14

0xF

1111

0xF

1111, 15

0xC

12

What are the private IP address ranges?

192.168.0.0 - 192.168.255.255 (65,536 IP addresses) 172.16.0.0 - 172.31.255.255 (1,048,576 IP addresses) 10.0.0.0 - 10.255.255.255 (16,777,216 IP addresses)

What is a BSS in 802.11

A SS (service set) is a set consisting of all devices associated with a 802.11 IEEEE WLAN. A BSS is a basic service set: one AP with all associated STA's grouped together.

What is a microprocessor?

A microprocessor is a computer processor which incorporates the functions of a computer's central processing unit (CPU) on a single integrated circuit (IC),[1] or at most a few integrated circuits.[2] A microprocessor is a single-chip implementation of a CPU. Nowadays pretty much all CPUs for general use are microprocessors, causing the two terms to be practically synonymous.

What is the difference between a microprocessor and a microcontroller?

A microprocessor is typically a SINGLE CHIP implementation of a CPU. A Microcontroller is a Full system on a chip.

What is an ad-hoc network?

A network that does not rely on a pre-existing infrastructure e.g. routers or AP in wireless networks.

What is a lower triangular matrix?

A square matrix is called lower triangular if all the entries above the main diagonal are zero. Similarly, a square matrix is called upper triangular if all the entries below the main diagonal are zero. Note that it must be square.

What is a structural hazard/dependency?

A structural hazard occurs when a part of the processor's hardware is needed by two or more instructions at the same time. A canonical example is a single memory unit that is accessed both in the fetch stage where an instruction is retrieved from memory, and the memory stage where data is written and/or read from memory.[3] They can often be resolved by separating the component into orthogonal units (such as separate caches) or bubbling the pipeline.

What is an exception?

An exception is a transfer of control to the OS kernel in response to some event i.e. change in processor state.

Pete Hunt "Rethinking Best Practices" : React Components are basically just idempotent functions, what does idempotent mean in this context?

An operation that will produce the same result if executed once or multiple times

The Internet is a ___ of ___?

Network of networks? communicated by an EGP like BGP and IGP

Why is array search O(n)?

Need to find that element by checking each element of the array which grows with the size of the array.

Python Tuples vs Lists?

Tuples are immutable and fixed size, Lists are mutable and dynamic Convention says to use Tuples for heterogeneous collections, whereas Lists are not so much

What is a 2-way set associative cache?

Two blocks/lines per set. Two ways. There are two spots for each block to be stored. This cache is made up of sets that can fit two blocks each. The index is now used to find the set, and the tag helps find the block within the set.

How many outputs does a half-adder have?

Two! One for C_out and one for Sum

How are unions memory managed in C?

Typically, sizeof or malloc will determine based on the biggest part of the union so that it will have space regardless of which part of the union is chosen.

What is fc00::/7

ULA - unique local address. Approximate IPv6 counterpart of IPv4 private addresses. These addresses are reserved for local use in home and enterprise environments and are not in public address space. These addresses might not be unique, and there is no formal address registration. Packets with these addresses in the source or destination fields are not intended to be routed on the public Internet but are intended to be routed within the enterprise or organisation.

Why do we need virtual memory?

Virtual memory is a layer of indirection. - "Any problem in CS can be solved w indirection" Problem #1 - Not enough memory. Sol. use swaps from Hard disk - take old memory from ram and move into hard disk, and update new processes into ram Problem #2 - Holes in address space of RAM sol. use separate mappings for each program and in different parts of RAM Problem #3 - Keeping programs secure sol. keep separate mappings for each process and thus though the instructions say to access the same memory location, each process is isolated!

What happens when you mix complementary colors together?

When you mix two opposites together anywhere on the Color Wheel, the result becomes increasingly neutral.

No write allocate

on a write miss to a cache, write directly to appropriate location in memory instead. Q:: WHAT DO WE DO ON READS?

Coroutines vs generators?

But as you may have noticed, generators are all about iterators. Now having a better way to create iterators is obviously great (and this is shown when you define an __iter__() method on an object as a generator), but people knew that if we took the "pausing" part of generators and added in a "send stuff back in" aspect to them, Python would suddenly have the concept of coroutines in Python (but until I say otherwise, consider this all just a concept in Python; concrete coroutines in Python are discussed later on). And that exact feature of sending stuff into a paused generator was added in Python 2.5thanks to PEP 342. Among other things, PEP 342 introduced the send()method on generators. This allowed one to not only pause generators, but to send a value back into a generator where it paused.

SQL Joins - inner, left, right, full outer

Default join is inner. drop all things that dont match on both sides left - drop things that dont match on right, keep all elft right - reverse of left outer - everything

What's the golden rule of rebasing?

Don't do it on public branches.

HEAD

HEAD is used by repo to define what is currently checked out. If you checkout a branch, head symbolically refers to that branch, indicating that the branch name should be updated after the next commit operation. If you checkout a specific commit, HEAD refers to that commit only. This is referred to as a detached HEAD and occcurs for example if you check out a tag name.

-> Why would you want generators over a function that returns an array?

However, instead of building an array containing all the values and returning them all at once, a generator yields the values one at a time, which requires less memory and allows the caller to get started processing the first few values immediately. In short, a generator looks likea function but behaves like an iterator.

Shoulder : Three Bones

Humerus, Clavicle (Collarbone), Scapula (Shoulder Blade)

What is __path__?

If the module is a package (either regular or namespace), the module object's __path__ attribute must be set. The value must be iterable, but may be empty if __path__ has no further significance. If __path__ is not empty, it must produce strings when iterated over. More details on the semantics of __path__ are given below. Non-package modules should not have a __path__ attribute.

Multitenancy

The term "software multitenancy" refers to a software architecture in which a single instance of software runs on a server and serves multiple tenants. A tenant is a group of users who share a common access with specific privileges to the software instance. With a multitenant architecture, a software application is designed to provide every tenant a dedicated share of the instance - including its data, configuration, user management, tenant individual functionality and non-functional properties. Multitenancy contrasts with multi-instance architectures, where separate software instances operate on behalf of different tenants. [1]

list = [1,2,3] list.index(3,0,0) returns...?

ValueError: 3 is not in list

Merge A-B-C-D \ -W - X - Y - Z results? What's at Z^?

Z^ is the old Z before merge and Z contains (Z+D) due to merge commit.

top shortcuts (k,q,r,s,P,M,l,t,m,B,u) run with (-b, -n)

k - kill q - quit r - renice s - change update rate P - sort by CPU usage M - sort by memory usage l - toggle load average t - toggle task display

Give 3 examples of threading?

1. manger/worker 2. peer 3. pipeline

David Deida - Way of the Superior Man (Chapter 1 23:12) - What does Deida propose as a way to get in touch with deepest purpose?

To stop doing. Start feeling. Feel the source of every thought coming and going as a man during meditation. Be in isolation.

Chapter 1 31:13 - David Deida - For one to discover his deepest masculine purpose. The feminine is change. Requires that you develop the capacity to simply .... your .... and body as they .... without ...

develop the capacity to simply love your mind and body as they change without believing in what they tell you too much.

STAT244: How to shape a vector into a matrix in R?

dim(vec) <- c(2,4)

In VanillaJS, write code that sets name-value expiry date and path

document.cookie = " ppkcookie1=testcookie; expires=Thu, 2 Aug 2001 20:47:11 UTC; path=/"

The Natural: Men are logical.. women are...

emotional. dont deprive them of any emotions.

Of the following, order from bottom of tech stack to higher levels. signals exceptions nonlocal jumps process context switch

exceptions process context switch signals nonlocal jumps

git rm vs git rm--cached vs rm?

git rm = rm && git add <fileremoved> git rm --cached = remove file from index but keep local copy in fs

Explain the rod-cutting problem

givena rod of length n inches, and a table of prices p_i for i = 1,2,...n determine maximum revenue obtainable by cutting up the rod and selling the pieces.

Natural: Why did you get labelled an a$$hole why when you werent?

got rationalized as an a$$hole due to rejection and opposition to betaization. some women fluctuate between the two sides.

Regression Analysis: P-Value

he p-value is defined informally as the probability of obtaining a result equal to or "more extreme" than what was actually observed, when the null hypothesis is true.[5][6][7] This ignores the distinction between two-tailed and one-tailed tests which is discussed below. In frequentist inference, the p-value is widely used in statistical hypothesis testing, specifically in null hypothesis significance testing. In this method, as part of experimental design, before performing the experiment, one first chooses a model (the null hypothesis) and a threshold value for p, called the significance level of the test, traditionally 5% or 1% [8] and denoted as α. If the p-value is less than or equal to the chosen significance level (α), the test suggests that the observed data is inconsistent with the null hypothesis, so the null hypothesis must be rejected. However, that does not prove that the tested hypothesis is true. When the p-value is calculated correctly, this test guarantees that the Type I error rate is at most α. For typical analysis, using the standard α = 0.05 cutoff, the null hypothesis is rejected when p < .05 and not rejected when p > .05. The p-value does not, in itself, support reasoning about the probabilities of hypotheses but is only a tool for deciding whether to reject the null hypothesis.

Write the height and size functions for a red-black tree represented as: type Color = R | B type Tree = E | T Color Tree Int Tree

height t = case t of E -> 0 T _ l _ r -> 1 + max (height l) (height r) size t = case t of E -> 0 T _ l _ r -> 1 + size l + size r

What does it mean when correlation is equal to 0?

http://stattrek.com/statistics/correlation.aspx?Tutorial=AP The sign and the absolute value of a correlation coefficient describe the direction and the magnitude of the relationship between two variables. The weakest linear relationship is indicated by a correlation coefficient equal to 0. A positive correlation means that if one variable gets bigger, the other variable tends to get bigger. A negative correlation means that if one variable gets bigger, the other variable tends to get smaller. Keep in mind that the Pearson product-moment correlation coefficient only measures linear relationships.

Regression Analysis: Describe all steps of a hypothesis test

https://www3.nd.edu/~rwilliam/stats1/x24.pdf

What is happening here?

if MEM[PC] == ADD Rd, Rn, Rm GPR[Rd] ← GPR[Rn] + GPR[Rm] PC ← PC + 4

What is a word?

"Word size" refers to the number of bits processed by a computer's CPU in one go (these days, typically 32 bits or 64 bits). Data bus size, instruction size, address size are usually multiples of the word size.

What do pty and tty mean in Unix?

"tty" originally meant "teletype" and "pty" means "pseudo-teletype". In UNIX, /dev/tty* is any device that acts like a "teletype", ie, terminal. (Called teletype because that's what we had for terminals in those benighted days.) A pty is a pseudotty, a device entry that acts like a terminal to the process reading and writing there, but managed by something else. They first appeared (as I recall) for X Windows and screen and the like, where you needed something that acted ilke a terminal but could be used from another program http://stackoverflow.com/questions/4426280/what-do-pty-and-tty-mean

In git: what command can you use to display graphical view of the git branches?

$git log --graph

What command is used to get system information in Linux?

$uname

How does NGINX use the reactor pattern?

(VIDEO to come)

What are the components of the MVVM pattern?

* Model * View-Model - The view model is an abastraction of the view, exposing public properties and commands. The VM, has no controller, instead has a binder. * View * Binder - Declarative Data and command binding are implicit in the MVVM pattern

Describe what goes inside an 802.11 frame header

* Version - protocl v. of 802.11 (2 bits) * Type - type of frame * Subtype 4 bits * Frame Control Flags * Duration Seq # - field used to eliminated duplicate received frames and reassemble fragments * Fragment # - eliminate duplicate received frames

Name 10 shittests

* jealousy * therapist conversion * "you're a player!" * negs * making you do things e.g. by drinks, * ultimatums (either them or me) * boyfriending * marriage * ignoring * girl freeze outs - being late * unsure about feelings * hitting the bathroom then taking forever * demanding to spend more time together * "you say that to all the girls" * "why?" * "you just want to .. me"

What is a portal, BSS, AP, STA, Distribution SYstem, ESS in 802.11?

* network station (STA) - terminal with access mechanisms to the wireless medium and radio contact to the access point. * access point (AP) - station integrated into the WLAN and the distributed system * basic service set (BSS) - group of stations using the same AP * portal - bridge to other (wired) networks * distribution system - interconnection network to form one logical network (ESS) based on several BSS

Why are processes important?

**Abstraction 1:** Logical control flow: You get the illusion that each program seems to have exclusive use of CPU (this is done via context switching) **Abstraction 2:** Private address space: Each program seems to have exclusive use of main memory. Provided by kernel mechanism called virutal memory.

In assembly for x86, ia32 how are sys calls performed?

**syscall** is default way of entering kernel mode on x86-64. This instruction is not available in 32 bit modes of operation on Intel processors. **sysenter** is an instruction most frequently used to invoke system calls in 32 bit modes of operation. It is similar to syscall, a bit more difficult to use though, but that is kernel's concern. **int 0x80** is a legacy way to invoke a system call and should be avoided.

How does a 2-bit predictor, 2-bit counter work?

00 Strong Not Taken 01 - Weak Not Taken 10 - Weak Taken 11 - Strong Taken

0x0

0000

0x1

0001

0x2

0010

2

0010

0x3

0011

0x4

0100

0x5

0101

0x6

0110

6

0110

0x7

0111

0101

0x5

0110

0x6

0111

0x7

1000

0x8

1001

0x9

1010

0xA

1011

0xB

1100

0xC

1110

0xE

1111

0xF

STAT244: is R 0 index based or 1 index based?

1 index based

Status code sets 1xx 2xx 3xx 4xx 5xx?

1 is informational, 2 - successful, 3 - reidrection, 4 - client error, 5 - server error

What is inside an ethernet frame header?

1. 64-bit Preamble - used for synchronization purposes 2. Dest MAC 3. Src MAC (optional 802.1Q) here 4. Type of Payload (EtherType) 5. Payload 6. 32-bit CRC

Javascript: Name 6 ways to iterate over a JS object

1. for in construct -> own and inherited, check with .hasOwnProperty Note that you can use .forEach chaining for more flexible looping 2. Object.keys -> own enumerable 3. Object.entries -> own enumerable 4. for... of loops?? -> loops over iterable collections 5. Object.getOwnPropertyNames -> enumerable or not 6. Object.values

What are the 4 steps of a greedy stays ahead proof for ISMP?

1. label algos partial solutions and a general solution. 2. Find a heuristibc by which greedy stays ahead of highest # of intervals a general/optimal solution. 3. Show that greedy stays ahead by induction 4. Prove optimality.

How is time-travelling possible in elm? Define in 3 Reasons

1. Due to pure functions, functions can be "replayed" safely. 2. All input sources to an elm program are known statically at compile time. You declare that your game expects keypressed and mouse clicks. This makes inputs easy to track. So we record ethe history of inputs. 3. Elm programs might have state, but that state is stored by the runtime, not the program, thus reactor can jump to any state because this internal state is determined entirely by recorded input events.

Name the five invariants of a red-black tree and what critical property they enforce.

1. Each node is either red or black. 2. The root is black. This rule is sometimes omitted. Since the root can always be changed from red to black, but not necessarily vice versa, this rule has little effect on analysis. 3. All leaves (NIL) are black. 4. If a node is red, then both its children are black. 5. Every path from a given node to any of its descendant NIL nodes contains the same number of black nodes. Some definitions: the number of black nodes from the root to a node is the node's black depth; the uniform number of black nodes in all paths from root to the leaves is called the black-height of the red-black tree. The path from the root to the farthest leaf is no more than twice as long as the path from the root to the nearest leaf

How does extraction work in binary heaps?

1. Extract root and swap with rightmost **leaf** 2. Compare new root with children; if correct order, stop 3. If not, swap elements downwards. NOTE: what do i do if the tree is no longer complete?

What are the elementary row operations?

1. Interchange two rows or columns (swap) 2. Multiply each element in a row or column by a non-zero value. 3. Multiply a row or column by a nonzero # and add result to another row or column.

What are the 3 steps of an exchange argument proof?

1. Label your current algorithm as A. Label an optimal algorithm as O(in this example). 2. Assume that the optimal solution is not the same as your greedy algorithm. 3. Exchange or swap elememnts in O to move it like A.

What are the three newtonian laws

1. Law of inertia. 2. F=ma 3. Action-reaction

Rules of shortening IPv6?

1. Leading zeros in a group may be omitted, but each group must be taking at least 1 hex digit except if its the first digit 2. one or more consecutive groups of zero values may be replaced with a single empty group using 2 consecutive colons (::)

Describe red-black trees in 4 points (michael sambol)

1. Node is either red or black 2. The root and the leaves are black ?? 3. If a node is red, then its children are black 4. All paths from a node to its nil descendants contain the same number of black nodes.

Describe red-black trees in 4 points (michael sambol)

1. Node is either red or black 2. The root and the leaves are black ?? 3. If a node is red, then its children are black (red-red property) 4. All paths from a node to its nil descendants contain the same number of black nodes.

What are the process states?

1. Running - CPU is running instructions A process moves into the running state when it is chosen for execution. The process's instructions are executed by one of the CPUs (or cores) of the system. There is at most one running process per CPU or core. A process can run in either of the two modes, namely kernel mode or user mode.[1][2] 2. Waiting - 3. Sleeping - A process is sleeping when it is blocked, waiting for something. For example, it might have called read() and is waiting on data to arrive from a network stream. sleep() is indeed one way to have your process sleep for a while. Sleeping is, however, the normal state of all but heavily compute-bound processes - sleeping is essentially what a process does when it isn't doing anything else. It's the normal state of affairs for most of your processes to be sleeping - if that's not the case, it tends to indicate that you need more CPU horsepower. 4. Stopped - 5. Zombie

Name the 8 man pages and their sections

1. User commands 2. System Calls 3. C Library Functions 4. Devices and Special Files 5. File formats and conventions 6. Games/Screensavers 7. Miscellanea 8.System administration commands and daemons https://en.wikipedia.org/wiki/Man_page

What types of programs are well suited for threading? (name 5)

1. Work that can be executed, or data that can be operated on, by multiple tasks simultaneously: 2. Block for potentially long I/O waits 3. Use many CPU cycles in some places but not others 4. Must respond to asynchronous events 5. Some work is more important than other work (priority interrupts)

How many subnets in...

2^8-2

How long is an IPv6 Address?

8 groups of 4 hex digits, each group represents 16 bits or 2 octets, 128 bits in total

What numbers have 1s aligned from left to right

8, 12, 14, 15

What is the loopback address in IPv6?

::1 or 0:0:0:0:0:0:0:1

Status Line looks like, Request Line looks like ? (HTTP)

<PROTOCOL> <CODE> <MSG> <ACTION> <URI> <PROTOCOL>

Peering vs settlement freeness

???? TODO

CPU vs microprocessor?

A CPU (central processing unit) is the part of a computer that executes instructions. This can be implemented using a single IC, a number of ICs, discrete transistors or a room full of vacuum tubes. A microprocessor is a single-chip implementation of a CPU.

What is a ESS in 802.11?

A ESS is the extended SS. This can be the amalgamation of two or more interconnected wireless BSSs that share the same SSID, credentials and integrated wLANS that appear as a isngle BSS to the logical layer. e.g. UChicago WIFI is a ESS.

What is a promise?

A Promise is a proxy for a value not necessarily known when the promise is created. It allows you to associate handlers to an asynchronous action's eventual success value or failure reason. This lets asynchronous methods return values like synchronous methods: instead of the final value, the asynchronous method returns a promise for the value at some point in the future.

What is a binary heap really?

A binary heap is a binary tree with two additional constraints: 1. Shape property: a binary heap is a complete binary tree; that is, all levels of the tree, except possibly the last one (deepest) are fully filled, and if the last level is not complete then nodes are filled left to right. 2. Heap property: the key stored in each node is either greater than or equal to (≥) or less than or equal to (≤) the keys in the node's children, according to some total order.

What is reentrancy in computer science?

A computer program or subroutine is called reentrant if it can be interrupted in the middle of its execution and then be safely called again ("re-entered") before its previous oinvocations completely executes.

STAT244: Correlation vs Covariance?

A correlation coefficient measures the extent to which two variables tend to change together. The coefficient describes both the strength and the direction of the relationship. Covariance measures the linear relationship between two variables. Covariance is not standardized, unlike the correlation coefficient. Therefore, covariance values can range from negative infinity to positive infinity. Positive covariance values indicate that above average values of one variable are associated with above average values of the other variable and below average values are similarly associated. Negative covariance values indicate that above average values of one variable are associated with below average values of the other variable. A correlation coefficient is the covariance divided by the product of each variable's standard deviation Although both the correlation coefficient and the covariance are measures of linear association, they differ in the following ways: Correlations coefficients are standardized. Thus, a perfect linear relationship results in a coefficient of 1. Covariance values are not standardized. Thus, the value for a perfect linear relationship depends on the data. The correlation coefficient is a function of the covariance. The correlation coefficient is equal to the covariance divided by the product of the standard deviations of the variables. Therefore, a positive covariance always results in a positive correlation and a negative covariance always results in a negative correlation.

STAT244: What is the data frame type in R?

A data frame is used for storing data tables. List of vectors of equal length. Think of it as a sort of db table or excel sheet.

What is a heap?

A heap is a special tree structure (ADT) where the elements are "partially sorted" and satisfies the heap property -- the key stored in each node is either greater than or equal to or less than or equal to the keys in the node's children, according to some total order. Thus, heap's typically allow find-min or find-max to be O(1) time.

Why in Haskell, ELM, are parameters and return types NOT different in signature? i.e. div:: Int -> Int -> Int

All functions are considedred curried. All functions take one argument div returns a function. In the example. div 11 returns a function that divides whatever int given by 11. Then we apply that function to a value.

What is row-echelon form?

All nonzero rows (rows with at least one nonzero el) are above any rows of all zeroes. 2. Pivots are alway sto the right?

Ethernet is a Layer 2 Protocol, and so is ARP. However, Ethernet frames have an Ethertype header that indicates the protocol being used at the data-link layer such as ARP or IPv4. Is this a misnomer then? Is ARP a protocol OF ethernet and OF the data-link layer or is this more for labelling convenience purposes or legacy reasons. Edit: To clear up any potential confusion to what I'm asking: IEEE 802.11 has a separate frame type that it sends and is also a Layer 2 Protocol, but it is not OF Ethernet, and there is no EtherType to represent it (from what I know). Why isn't there a separate ARP frame then instead of it being nested into an Ethernet frame?

ARP is a protocol that operates solely within a single network connected by the same data link, and it does not provide any of the functionality that a Network Layer protocol does (most notably, the ability to route between networks). So, its correct place is the Data Link layer. More generally, just because a protocol X is the payload of a Layer N protocol doesn't mean that protocol X is in layer N+1. The layer is determined by the kind of functionality provided by the protocol. A similar example is ICMP: it is the payload of IP but it is not a Transport Layer protocol; it's still a Network-layer protocol. Ethernet and 802.11 are different protocols, both at the same layer, both with (very broadly) the same purpose: to carry a payload within a given data link. While it is technically possible to tunnel 802.11 through Ethernet and viceversa (meaning that you could potentially have an 802.11 frame as the payload of an Ethernet frame, and viceversa), that is more of a corner case. First and foremost, you will either have an Ethernet network or an 802.11 network, and you will use the frame format appropriate to that network. So, in an 802.11 network, ARP requests are simply carried as the payload of an 802.11 data frame. Finally, take into account that Ethertypes don't show up in 802.11 networks because they use a different mechanism to determine the type of the payload. Ethernet has an Ethertype field in the frame header, whereas 802.11 relies on the presence of a SNAP header at the beginning of the payload of a data frame.

How are aborts handled?

Aborts current program.

Allopathic Medicine

Allopathic medicine is an expression commonly used by homeopaths and proponents of other forms of alternative medicine to refer to mainstream medical use of pharmacologically active agents or physical interventions to treat or suppress symptoms or pathophysiologic processes of diseases or conditions.

ANDS

Bitwise AND and set flags Rd = Rn AND imm

ORR

Bitwise OR

What is an integrated circuit?

An integrated circuit or monolithic integrated circuit (also referred to as an IC, a chip, or a microchip) is a set of electronic circuits on one small plate ("chip") of semiconductor material, normally silicon

Describe three parts of deltoid.

Anterior: front Medial: Side Rear(Posterior): Back

Of the three types of data dependencies, which are the easiest to handle?

Anti(WAR) and WAW(Output)

LDV Chant

Artistry, dedication, hard work, mission, mastery

Dennard scaling

As transistors get smaller, power density stays constnnt. Dennard scaling failed to address base level power of transistors and leaked power which leads to power wall.

David Deida - Way of the Superior Man (Chapter 1 26:27) - What is masculine Integrity?

Ask. How do I take care of the world? How do I die complete? No matter how much money I make. Setting up your life for integrity, that is managing born responsibilities to serve your deepest purpose.

Define Reactive Programming

Async programming paradigm oriented around data streams and the propagation of changes. This means that static/dynamic data streams are expressed aeasily and that underlying execution model will automaticaly propagate changes through the data flow a := b + c a is being assigned res of b and c. But b and c can be changed later on. In RP when and c are changed a is automatically updated.

What is the difference between asynchronous and synchronous exceptions?

Asynchronous exceptions are called interrupts. (Caused by events EXTERNAL to the processor, indicated by a n interrupt pin) Synchronous exceptiosn occur as a result of executing an instruction.

What are insulators?

Atoms and molecules composed. But each has positively charged nucleus and negatively charged electrons around. Negatively charged electrons CANNOT move around freely between atoms. You can charge an insulator to uniformly or bunch up one side.

Explain _.curry (lodash)

Basically transforams a function into a curry-able function.

3D Motto

Be decisive, dedicated, disciplined.

Regression Analysis: Alpha Value?

Before you run any statistical test, you must first determine your alpha level, which is also called the "significance level." By definition, the alpha level is the probability of rejecting the null hypothesis when the null hypothesis is true. Translation: It's the probability of making a wrong decision. Thanks to famed statistician R. A. Fisher, most folks typically use an alpha level of 0.05.

David Deida - Way of the Superior Man (Chapter 1 18:31) - A man must feel who he is ___ this life. Sourced in something that never ___ ands has never ___.

Beyond this life. "Ends" and has never "started".

Business of 3 tiers of autonomous systems?

Can get to rest of internet using settlement free agreements (tier 1) Pay to connect to to get but also sell transit? (Tier 2) Don't sell transit (tier 1)

Edward Treacher Collins - Arboreal Locomotion Hypothesis

Collins' idea has become known as the "arboreal locomotion hypothesis" - arboreal meaning living in trees. In the decades since, it has been expanded and refined, but the basic idea that our ancestors evolved forward facing eyes to accurately judge distances while leaping from tree to tree remained central for quite a while. After all, the stakes for failing to work out the true distance between trees were high. "The price of failure was to drop many metres onto a ground inhabited by carnivorous beasts," wrote visual psychotherapist Christopher Tyler in 199

SI Unit of charge is...

Coulomb - represented as C and frequently converted to e 1C = 6.24150975·1018e or 1e = 1.60217646·10-19C

What is a data hazard/dependency?

Data hazards occur when instructions that exhibit data dependence modify data in different stages of a pipeline. Ignoring potential data hazards can result in race conditions (also termed race hazards).

Elliot Hulse Qualities

Decisive Devoted Disciplined

Describe the bottom-up method

Depends on a natural notion of the "size" of a subproblem s.t. solving any particular subproblem only depends on solving "smaller" subproblems: 1.. sort the s.p. by size 2. solve them in size order smallest first 3. solve each subpproblem only once, which we first see it, we have already solved all of its previous subproblems.

Does a cookie exist after closing your browsers?

Depends on expiration date with "expires/max-age" field. If field is empty, then by default, browser trashes it, else it checks date.

What is X509

Digital certificate used to verify public key belongs to said user.

David Deida - Way of the Superior Man (Chapter 1 26:27) - All efforts ___. The superior man is always ____ and ____ __.

Dissolve. The superior man is always giving and letting go. Whatever you build will fall aprt. Whatever relationships you have will be destroyed. Everything you give is only light dissolving into its sources consciousness.

What are some examples of exceptions?

Divide by 0, arithmetic overflow, page fault, I/O request completes, CTRL-C

Kyle simpson: How does a promise "uninvert the IoC"?

Doesn't use Continuation Passing Style to someone else. Instead says "give me an event listener" and I'll listen for it.

Object.values() var obj = { foo: "bar", baz: 42 }; console.log(Object.values(obj)); var obj = { 0: 'a', 1: 'b', 2: 'c' }; console.log(Object.values(obj)); //

ES2017 (Draft) Object.values() returns an array whose elements are the enumerable property values found on the object. The ordering of the properties is the same as that given by looping over the property values of the object manually. The Object.values() method returns an array of a given object's own enumerable property values, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well). // ['bar', 42] // ['a', 'b', 'c']

Chapter 1 28:30 - David Deida - Feel the ___

Feel the space. Do not postpone your deepest gift just because you do not know. Give it every day. It may change but for now give it no matter what. Do not postpone one more day living your deepest gift.

Object.entries() var obj = { foo: "bar", baz: 42 }; console.log(Object.entries(obj)); var obj = { 0: 'a', 1: 'b', 2: 'c' }; console.log(Object.entries(obj));

ES2017 (Draft) The Object.entries() method returns an array of a given object's own enumerable property [key, value] pairs, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well). Object.entries() returns an array whose elements are arrays corresponding to the enumerable property [key, value] pairs found directly upon object. The ordering of the properties is the same as that given by looping over the property values of the object manually. // [ ['foo', 'bar'], ['baz', 42] ] // [ ['0', 'a'], ['1', 'b'], ['2', 'c'] ]

Object.keys() var arr = ['a', 'b', 'c']; console.log(Object.keys(arr)); var obj = { 0: 'a', 1: 'b', 2: 'c' }; console.log(Object.keys(obj));

ES5 Returns: An array of strings that represent all the enumerable properties of the given object. Object.keys() returns an array whose elements are strings corresponding to the enumerable properties found directly upon object. The ordering of the properties is the same as that given by looping over the properties of the object manually. The Object.keys() method returns an array of a given object's own enumerable properties, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).

TCP connection teardown states of active closer and passive closer?

ESTABLISHED->FIN_WAIT_1->FIN_WAIT_2->TIME_WAIT->CLOSED ESTABLISHED->CLOSE_WAIT->LAST_ACK->CLOSED

Why can't you see these components on a CPU?

Early CPUs consisted of many separate components, but since the 1970s, they've been integrated into a single unit as a microprocessor. Thus a CPU is a specific TYPE of microprocessor.

EOR

Exclusive Or Rd = Rn And imm

What are some examples of stages in the RISC pipeline can use data forwarding?

Execute to memory access of another stage. Writeback to Execute of another stage. Forward data from Writeback(WB) to Execute (EX) stage. It might happen that an instruction is at WB stage and wants to update the value of a register. In the same time, another instruction is at the EX stage and want to use the value of the same register. Here we want you to implement your simulator in a way that the updated value is forwarded to EX stage from WB stage. Here is an example. 1)adds X8, X1, 0x1 2)adds X19, X2, 0x2 3)adds X11, X8, 0xff When instruction 1 is at WB stage, instruction 3 is at EX stage and we can forward the value of register X8 from WB to EX stage. Forward data from Memory Access(MEM) to Execute (EX) stage. Now consider this case, 1)adds X8, X1, 0x1 2)adds X19, X8, 0x2 Here, rst instruction is an "add" and wants to update the value of register X8, and second instruction wants to use the value of register X8. When rst instruction is at EX stage it calculates the value of register X8, so when this instruction ow through MEM stage the value of register X8 is already calculated and can be forwarded to EX stage where the second instruction needs it.

What is a flip-flop

Flip-flops and latches are used as data storage elements. A flip-flop stores a single bit (binary digit) of data; one of its two states represents a "one" and the other represents a "zero". Such data storage can be used for storage of state, and such a circuit is described as sequential logic. When used in a finite-state machine, the output and next state depend not only on its current input, but also on its current state (and hence, previous inputs). It can also be used for counting of pulses, and for synchronizing variably-timed input signals to some reference timing signal. Flip-flops can be either simple (transparent or opaque) or clocked (synchronous or edge-triggered). Although the term flip-flop has historically referred generically to both simple and clocked circuits, in modern usage it is common to reserve the term flip-flop exclusively for discussing clocked circuits; the simple ones are commonly called latches.[1][2]

Describe Promise.all(); - How is it settled if given three async tasks?

Given three tasks in an array. The Promise will only resolve when all three are completed. However, when one of them fails, the whole promise rejects.

Explain the stable marriage problem

Given two sets of objects, each with a priority list of the other set, can we create a stable set, where stable is defined as there not existing a "better match". Formally stable: There is an element A of the first matched set which prefers some given element B of the second matched set over the element to which A is already matched, and B also prefers A over the element to which B is already matched.

What are the four forces of nature? Give examples of each

Gravitational, Electromagnetic, Weak Nuclear Forces, Strong Nuclear Forces Gravitational - Weight of object near a planet; force that keeps planets in their orbits around the sun Electromagnetic - Force that keeps an electron in its orbit around the atomic nucleus; (i.e., attraction or repulsion between a "charged" plastic comb and a strand of hair) Strong Nuclear - Force that keeps protons and neutrons together in a nucleus Weak Nuclear - Force responsible for certain types of nuclear reactions - radioactive decay

Characteristics of a Natural

He's a leader. - show her your world. be decisive. Humor - Humor about her (not put on pedestal). Humor at his own cost. (doesn't take himself too seriously) - always fun to hang out with Social - always befriending people. - doesn't judge people He has goals - knows what he wants and busy. Unapologetic - has a set of values and acts according to them. Might not be perfect, but perfect with himself. (Don't be apologetic about sex) He's always in a good mood - (True confidence) - Despite adversity -- knows that no matter what happens, he's going to be just fine. Sees the world as easy. Believe you're gonna be fine no matter what. He has his OWN reality - He plays by his own rules. Doesn't make other people's opinions his rules. He has a strong frame. Think Nietzsche camel vs lion/baby.

According to Linus Torvalds, explain what a good git commit message is

Header line: explain commit message ine one line. Body of commit message can be several paragraphs, cols < 74 Explain why Resolves: Insert issue numbers here See also: Relevantt issues.

The Natural: Comfort test subtext

Hey I really like you, please prove that you're not one of those.

Natural: Wolfgang first frame

I deserve the best for myself. I love staying in set. I love maintaining eye contact. Most of all, I love challenges. I love the thrill of this PUA challenge, because it is so fundamental to human life and important to my growth. I like it when I get rejected because it gives me an opportunity to grow. I want to find the connection between myself and another human I want to give my gift to others. I swear that I will never stop improving and continue to challenge myself. I will push my boundaries every single day to become the man I want to be and all the while enjoy the journey. I am my own man, independent, and have a gift to give while working for my highest purpose. I am grateful for all the mistakes I made, I make, and I will make, because my mistakes make who I am. I am NOT perfect, but I deserve a ten, because neither is she and neither is he. I do NOT care what other people think of me. I am to become a master of many things. I love myself because I'm awesome. I'm attractive because: * I'm talented in music/singing/dancing * I'm mission-oriented * I'm interesting * I am my own man * I am athletic * I am disciplined * I am funny * I can be charismatic * I am unselfish * I am street-smart * I am risk-taking * I am unconventional * I am ambitious * I am a genius And most of all, I love myself, and I love my life, and I love this world.

Degrees of Freedom Explanation:

I like this earlier answer on the same topic: If I have a vector of length ten that can take any values, then you need all ten coordinates to know what the vector is, and there are ten degrees of freedom. If I tell you that the sum of the elements of the vector is zero, then any nine of the coordinates determine the tenth, and there are nine degrees of freedom. If I also tell you that the sum of the squares of the elements of the vector is one, then any eight of the coordinates determine the last two, and there are eight degrees of freedom. If I tell you that the vector is parallel to a fixed vector, then there's only one degree of freedom, which corresponds to the ratio of the coordinates of the two vectors. The key idea is that the degrees of freedom is the minimum number of values that you need to specify a quantity. If you're comfortable with geometry in the abstract, you can think of the degrees of freedom as the dimension of the space that the numbers "live in".

Explain Network Address Translation (IP masquerading) on a Router

IP masquerading is a technique that hides an entire IP address space, usually consisting of private IP addresses, behind a single IP address in another, usually public address space. The address that has to be hidden is changed into a single (public) IP address as "new" source address of the outgoing IP packet so it appears as originating not from the hidden host but from the routing device itself. Because of the popularity of this technique to conserve IPv4 address space, the term NAT has become virtually synonymous with IP masquerading.

FP: Lazy v Eager Evaluation

In computer programming, eager evaluation or greedy evaluation is the evaluation strategy used by most traditional programming languages. In eager evaluation, an expression is evaluated as soon as it is bound to a variable. An alternative to eager evaluation is lazy evaluation, where expressions are evaluated only when a dependent expression is evaluated.[clarification needed] Imperative programming languages, where the order of execution is implicitly defined by the structure of the source code, almost always use eager evaluation.[why?] One advantage[clarification needed] of eager evaluation is that it eliminates the need[clarification needed] to track and schedule the evaluation of expressions. It also allows the programmer to dictate the order of execution, making it easier to control when sub-expressions (including functions) within the expression will be evaluated, as these sub-expressions may have side effects that will affect the evaluation of other expressions. Disadvantages of eager evaluation[clarification needed] are that it forces the evaluation of expressions that may not be necessary at run time, and it may delay the evaluation of expressions that have a more immediate need. In imperative languages, it also forces the programmer to organize the source code for optimal order of execution. Conversely, it allows the programmer to order the source code to control the order of execution.

Regression Analysis: Central Limit Theorem

In probability theory, the central limit theorem (CLT) establishes that, for the most commonly studied scenarios, when independent random variables are added, their sum tends toward a normal distribution (commonly known as a bell curve) even if the original variables themselves are not normally distributed. In more precise terms, given certain conditions, the arithmetic mean of a sufficiently large number of iterates of independent random variables, each with a well-defined (finite) expected value and finite variance, will be approximately normally distributed, regardless of the underlying distribution.[1][2] The theorem is a key concept in probability theory because it implies that probabilistic and statistical methods that work for normal distributions can be applicable to many problems involving other types of distributions.

Describe insertion sort, then write it out

Insertion sort is kinda how you organize cards naturally. You have a sorted section and an unsorted section. You move from left to right through the unsorted section but compare from right to left in the sorted section. ``` for i =1 to a.length - 1 element = array[i] j = i while (j > 0 and array[j-1] > element) array[j] = array[j-1] j = j - 1 array[j] = element //insert element here ``` Worst case: \Theta(n^2) Θ(n ​2 ​​ ). Best case: \Theta(n) Θ(n). Average case for a random array: \Theta(n^2) Θ(n2​ ). "Almost sorted" case: \Theta(n) Θ(n).

What does Gerard Berry say on Reactive Programming?

It is convenient to distinguish roughly between three kinds of computer programs. Transformational programs compute results from a given set of inputs; typical examples are compilers or numerical computation programs. Interactive programs interact at their own speed with users or with other programs; from a user point of view, a time-sharing system is interactive. Reactive programs also maintain a continuous interaction with their environment, but at a speed which is determined by the environment, not the program itself. Interactive programs work at their own pace and mostly deal with communication, while reactive programs only work in respond to external demands and mostly deal with accurate interrupt handling. Real-time programs are usually reactive. However, there are reactive programs that are not usually considered as being real-time, such as protocols, system drivers, or man-machine interface handlers.

When you read, open, write a file, how is it performed?

It uses a system call (trap) in order to get the kernel to do something.

Integrated Circuit

Just think of as synonymous with chip, but these chips are composed of electronic componenets. Integrated circuit vs Discrete circuit.

Memoization vs DP?

Memoization is a term describing an optimization technique where you cache previously computed results, and return the cached result when the same computation is needed again. Dynamic programming is a technique for solving problems recursively and is applicable when the computations of the subproblems overlap. Dynamic programming is typically implemented using tabulation, but can also be implemented using memoization. So as you can see, neither one is a "subset" of the other. A reasonable follow-up question is: What is the difference between tabulation (the typical dynamic programming technique) and memoization? When you solve a dynamic programming problem using tabulation you solve the problem "bottom up", i.e., by solving all related sub-problems first, typically by filling up an n-dimensional table. Based on the results in the table, the solution to the "top" / original problem is then computed. If you use memoization to solve the problem you do it by maintaining a map of already solved sub problems. You do it "top down" in the sense that you solve the "top" problem first (which typically recurses down to solve the sub-problems).

What is middleware?

Middleware is a general term for software that serves to "glue together" separate often complex and already existing programs. Unix Pipe-like

What is a direct-mapped cache?

N-sets in a cache, 1-way. There is one spot, for each block to be stored. A cache block can only go in one spot in the cache. It makes a cache block very easy to find, but it‛s not very flexible about where to put the blocks.

What is a fully associative cache?

N-ways in a cache. 1 set (or no sets really..) No index is needed, since a cache block can go anywhere in the cache. Every tag must be compared when finding a block in the cache, but block placement is very flexible! There are n-ways to store a block. http://csillustrated.berkeley.edu/PDFs/handouts/cache-3-associativity-handout.pdf

What replaces ARP in IPv6?

NDP, neighbor discovery protocol and ICMPv6 and a couple other mechanisms. If a host wants to connect to an IPv6 Network, it just needs to know the routing prefix via NDP.

Has moore's law stopped?

No, not really. Rather we're at a power wall with dennard scaling i.e. the ability to drop voltage and current due to leakage are static power losses cuasing thermal runway.

DVIS: Steven's 4 scales of measurement? Name some examples and also the math

Nominal select from unorganized set (enumerated type, in C) apples, oranges, tomatoes, ... Toyota, Ford, Subaru, ... Ordinal ordered set of values (< operator available) January, February, March, ... Trial 1, Trial 2, Trial 3, ... 12 Oak St., 125 Oak St., 129 Oak St., ... Interval values are meaningful, but zero is arbitrary (+, - avail.) degrees Celsius position potential energy Ratio values are meaningful, meaningful zero (×, ÷ avail.) degrees Kelvin length mass

CS239 DVIS: What are Steven's levels of measurements?

Nominal, ordinal, interval, ratio

Non-square matrices don't have what?

Non-square matrices are non-invertible.

Define O(n),θ(n) and Ω(n) in T(n) (function being analyzed) and F(n) (function being expressed)

O(n) - usually the worst case running time. If eventually, for al sufficiently large n, T(n) is bounded above by a constant multiple of f(n) T(n) = O(f(n)) iff there exists constants c, n₀ s.t. T(n) ≤ c * f(n) T(n) = Ω(f(n)) iff there exists c, n₀ constants s.t. T(n) ≥ c * f(n) for all n ≥ n₀ T(n) = θ(f(n)) iff T(n) = O(f(n)) and T(n) = Ω(f(n)) use bar location to remember. Theta is when its bounded by c * f(n) for same function, but c could differ.

How does the shortest path problem demonstrate optimal substructure?

Optimal Substructure: In computer science, a problem is said to have optimal substructure if an optimal solution can be constructed efficiently from optimal solutions of its subproblems. This property is used to determine the usefulness of dynamic programming and greedy algorithms for a problem. What is the shortest path from Seattle to L.A.? If the path also crosses throug h portland and Sacramento, then the shortest route for portland to LA must pass through sacramento too.

Python Tuples

Orderd, immutable, fixed size, heterogeneous

Osteopathic Medicine

Osteopathy is a type of alternative medicine that emphasizes massage and other physical manipulation of muscle tissue and bones.[1] Its name derives from Ancient Greek "bone" (ὀστέον) and "sensitive to" or "responding to" (-πάθεια).[2][3][4] In the United States, osteopathic physicians are trained and are certified to practice medicine. They represent a branch of medicine called Osteopathic Medicine. Osteopaths trained elsewhere are trained only in manual osteopathic treatment, generally to relieve muscular and skeletal conditions, and are referred to as osteopathic practitioners.[5][6][7] They are not allowed to call themselves Osteopaths in the United States to avoid confusion with certified physicians. In the United Kingdom, France, Germany, Australia and New Zealand osteopaths are registered and regulated by law as therapists but may not practice medicine (although Germany, like Canada, allows US-trained osteopathic physicians to practice).

Matt Cartmill proposed a different idea: the "visual predation hypothesis"

Predators are best served, ostensibly, by having extremely good depth perception. That would help them to better locate and more effectively take down their prey, whether that's a leopard stalking a gazelle or a raptor snatching a rabbit in its talons, or one of our primate ancestors grabbing an insect from the branch of a tree. Cartmill thought his explanation was the most elegant, because it also explained other evolutionary changes that are distinctive to primates. Early primates, for example, hunt by sight rather than by scent. Cartmill thought that the reduction in their ability to smell was a side effect of the eyes' convergence, simply because the space available for the nose and its connections to the brain became smaller as it was crowded out by the eyes.

Priority Queues are...

Priority queues are a kind of queue in which the elements are dequeued in priority order. They are a mutable data abstraction: enqueues and dequeues are destructive. Each element has a priority, an element of a totally ordered set (usually a number) More important things come out first, even if they were added later Our convention: smaller number = higher priority There is no (fast) operation to find out whether an arbitrary element is in the queue Useful for event-based simulators (with priority = simulated time), real-time games, searching, routing, compression via Huffman coding

Explain Promise.prototype.then. Its params and return values.

Promise.prototype.then takes two cb functions. The first is for success, resolve(). The second is for error reject(). The second is optional and can be substituted for .catch. Promise.prototype.then returns another Promise and thus can be chained. This is useful if one async call depends on another async call.

What state does the active opener transition to after sending the first syn?

SYN_SENT

Explain Saturation in color theory (scott naismith)

Saturation is the purity of a hue. Desaturation is NOT adding gray. Colorfulness or saturation in colorimetry and color theory refers to the perceived intensity of a specific color. Colorfulness is the visual sensation according to which the perceived color of an area appears to be more or less chromatic.(wiki)

Why do we need Python sets if we already have Python tuples?

Sets are unordered collections and does not allow duplicates. Tuples are ordered

Python Data Structures

Sets, Lists, Tuples, Dictionaries

What is the terminology used to describe Promises that are either rejected or fulfilled?

Settled.

How can a BST degrade to a linked list?

Severely unbalanced linked list in one direction. All left or right subtrees.

How can a BST degrade to a linked list?

Severly unbalanced linked list in one direction. All left or right subtrees.

DVIS: Give 6 examples of Visual Encoding by Jacques Bertin:

Shape, Size, Color Hue, Color Value, Color Intensity, Texture

Drop a woman if...

She doesn't engage in your mission, vision, purpose.

In Babel and the general JS ecosystem what is the difference between a polyfill and a shim?

So while shims are used for covering up old sins, polyfills are used for bringing future enhancements back in time.

What is Clock SPeed/

Speed of CPU in a sense. Each CPU has a quartz clock and per clock tick the CPU performs instructions measured in cycles per second

Rank the forces in nature by both range and relative strength

Strong (strongest), Electromagnetic, Weak, Gravitational Grav (inf) Electromagnetic (inf) Strong 10^-15, Weak 10^-18

bijective functions are...

Surjective + injective -- preserves distinctiveness and all codomain vals are mapped. Bijective means both Injective and Surjective together. So there is a perfect "one-to-one correspondence" between the members of the sets. (But don't get that confused with the term "One-to-One" used to mean injective).

Surjective functions are...

Surjective means that every "B" has at least one matching "A" (maybe more than one). There won't be a "B" left out. Note the important part here (all codomain vals are mapped)

STAT244: What is the factor collection type?

Take on a limited number of different values that re usually categorical variables. Stored as a vector of integer values with orresponding set of characteristics

Describe Promise.race(); - How is this settled?

The Promise.race(iterable) method returns a promise that resolves or rejects as soon as one of the promises in the iterable resolves or rejects, with the value or reason from that promise.

Clock rate?

The clock rate typically refers to the frequency at which a chip like a central processing unit (CPU), one core of a multi-core processor, is running and is used as an indicator of the processor's speed. It is measured in clock cycles per second or its equivalent, the SI unit hertz (Hz). The clock rate of the first generation of computers was measured in hertz or kilohertz (kHz), but in the 21st century the speed of modern CPUs is commonly advertised in GigaHertz (GHz). This metric is most useful when comparing processors within the same family, holding constant other features that may impact performance. Video card and CPU manufacturers commonly select their highest performing units from a manufacturing batch and set their maximum clock rate higher, fetching a higher price. The clock rate of a CPU is normally determined by the frequency of an oscillator crystal. Typically a crystal oscillator produces a fixed sine wave—the frequency reference signal. Electronic circuitry translates that into a square wave at the same frequency for digital electronics applications (or, in using a CPU multiplier, some fixed multiple of the crystal reference frequency). The clock distribution network inside the CPU carries that clock signal to all the parts that need it. An A/D Converter has a "clock" pin driven by a similar system to set the sampling rate. With any particular CPU, replacing the crystal with another crystal that oscillates half the frequency ("underclocking") will generally make the CPU run at half the performance and reduce waste heat produced by the CPU. Conversely, some people try to increase performance of a CPU by replacing the oscillator crystal with a higher frequency crystal ("overclocking").[2] However, the amount of overclocking is limited by the time for the CPU to settle after each pulse, and by the extra heat created. After each clock pulse, the signal lines inside the CPU need time to settle to their new state. That is, every signal line must finish transitioning from 0 to 1, or from 1 to 0. If the next clock pulse comes before that, the results will be incorrect. In the process of transitioning, some energy is wasted as heat (mostly inside the driving transistors). When executing complicated instructions that cause many transitions, the higher the clock rate the more heat produced. Transistors may be damaged by excessive heat.

STAT244: variance vs standard deviation?

The standard deviation is the square root of the variance. The standard deviation is expressed in the same units as the mean is, whereas the variance is expressed in squared units, but for looking at a distribution, you can use either just so long as you are clear about what you are using. For example, a Normal distribution with mean = 10 and sd = 3 is exactly the same thing as a Normal distribution with mean = 10 and variance = 9

Standard Deviation vs Variance? How are the two related? What units do they use?

The standard deviation is the square root of the variance. The standard deviation is expressed in the same units as the mean is, whereas the variance is expressed in squared units, but for looking at a distribution, you can use either just so long as you are clear about what you are using. For example, a Normal distribution with mean = 10 and sd = 3 is exactly the same thing as a Normal distribution with mean = 10 and variance = 9. You don't need both. They each have different purposes. The SD is usually more useful to describe the variability of the data while the variance is usually much more useful mathematically. For example, the sum of uncorrelated distributions (random variables) also has a variance that is the sum of the variances of those distributions. This wouldn't be true of the SD. On the other hand, the SD has the convenience of being expressed in units of the original variable.

What is 802.11's medium on layer 1?

The symbol is the radio frequency wave.

STAT244: t-val vs p-val?

The t- value is a test statistic. The p value is a significance level. A test statistic is the result of a statistical test. The exact formula for t depends on what t test you are doing (one sample? two sample? if two sample, paired or independent?) but for two sample tests it is a standardized difference between the two means. (For the formulas see any book or Wikipedia or Mathworld or whereever). That is, it is a measure of how far apart the two means are. A p value answers the following question: If, in the population from which this sample was randomly drawn, the null hypothesis was true, how likely is it that I would get a test statistic at least as extreme as the one I got in a sample of the size I have?

X-Ray Vision Hypothesis

Theoretical neurobiologist Mark Changizi has yet another idea. In 2008 in the Journal of Theoretical Biology, he offered up the "X-ray vision hypothesis". In short, forward-facing eyes allowed our ancestors to see through the dense leaves and branches in their forest habitat. The catchy name for his hypothesis comes from a curious phenomenon. "When you hold up your finger vertically and fixate your eyes on something far beyond it," he writes, "you perceive two copies of your finger, and both copies of your finger appear transparent." Thus, you have the ability to "see through" your finger, as though you were seeing with X-ray vision.

Does a correlation of 0 imply zero relationship between two variables?

Therefore, a correlation of 0 does not mean zero relationship between two variables; rather, it means zero linear relationship. (It is possible for two variables to have zero linear relationship and a strong curvilinear relationship at the same time.)

How do are traps handeled?

They return to the next instruction.

ELM: FEM - 3 Types of collections, their length and types?

They're all flat immutable data structures * Records (Fixed length, mixed contents) * Tuples (Fixed length, mixed contents) * Lists (Variable length, uniform contents)

Explain Q = ne

This formula demonstrates that electric charge is quantized, Q is the symbol used to represent charge, while n is a positive or negative integer, and e is the electronic charge, 1.60 x 10-19 Coulombs.

The Promise constructor takes one argument. Explain this.

This is the executor function. The executor function is a callback passed into the Promise constructor. It is executed right away and is passed a resolve and reject function. Depending on logic of success or error one should call these functions appropriately.

Briefly describe LU decomposition

This is the method by which you can solve a system of linear equations by factoring a complex matrix into more manageable lower and upper triangular matrices.

David Deida - Way of the Superior Man (Chapter 1 24:58) - "What do I need to do or become to die complete?"

This is the question David Deida says is another way to put the idea of deepest purpose.

Describe the tiers of Autonomous systems

Tier 3 - large companies/organizations, small-medium ISPs Tier 2 - moderately large telecommunications companies Tier 1 - only 15 of em - arge ass telecom systems (largest of the three)

What is the traddeoff in dynamic programming?

Time and memory. D.P. uses additional memory to save computation time.

PUT does what?

Updates representation of resource

How do you implement BFS?

Use a queue.

How do you implement DFS?

Use recursion with memory being the stack, or use another stack.

How do page faults work?

User writes to memory location, but isn't in memory. So we have to grab the page from disk -- this is done by going into kernel mode, getting that page from disk to memory then re-executing. Page faults often return back to current instruction or abort.

What is the link-local address?

Uses fe80::/10 -- specific to the local network, not routable across networks. These addressees are used on a single link.

What is a write policy in reference to caches?

When a system writes data to cache, it must at some point write that data to the backing store as well. The timing of this write is controlled by what is known as the write policy.

https://heartiste.wordpress.com/2014/06/18/value-shit-tests-vs-comfort-shit-tests/

When a woman is seeking sexiness, her unrehearsed interrogation will take the form of value filters. The value shit test is a test for male aloofness, state control, abundance, coolness, and social acumen. When a woman is seeking security, she'll prod for signals of attainability and seriousness. The comfort shit test is lethal to newbies because they don't recognize it before it's too late, and because this shit test can sound *exactly* like a value shit test. But the context in which it is delivered is everything. What works to neutralize value shit tests won't for comfort shit tests. For this reason, Agree and Amplify is not a good response to the latter. All that will accomplish is boxing yourself into the "entertainment monkey" cad caricature she can have fun with and then safely and without regret disengage from once the act bores her. The best Comfort Shit Test response alleviates a girl's insecurity while strengthening emotional closeness.

Write back policy?

Write-back (also called write-behind): initially, writing is done only to the cache. The write to the backing store is postponed until the cache blocks containing the data are about to be modified/replaced by new content.

Write through policy?

Write-through: write is done synchronously both to the cache and to the backing store.

What is the shape property in binary heaps?

a binary heap is a complete binary tree; that is, all levels of the tree, except possibly the last one (deepest) are fully filled, and if the last level is not complete then nodes are filled left to right.

__dirname in node is...

a global variable that is actually local to each module has directory name of the current module

Describe what a "thunk" is in Functional programming

a thunk is a subroutine created to assist a call to another subroutine. Thunks are primarily used to represent an additional calculation that a subroutine needs to execute, or to call a routine that does not support the usual calling mechanism Kyle Simpson: "A thunk is a function that has everything already to give you some value back -- doesnt need any arguments, you simply call it." ``` function add(x,y){ return x + y; } var thunk = function(){ return add(10,15); } thunk() //25 ``` "this has now become a container of state at that time" -- underpinning behind promises. https://github.com/stephenhuh/snippets/blob/master/thunks.js Ravi Chugh: "We have "delayed" the evaluation of the expression by wrapping it in a function that takes the dummy argument (). Functions like are called "thunks" and turn out to be extremely useful for programming in (and compiling) functional languages. We will put thunks to good use later in the course."

Electromagnetism is what?

a type of physical interaction that occurs between electrically charged particles.

Serialize and deserialize a BST

class Codec: def serialize(self, root): def preorder(node): if node: vals.append(str(node.val)) preorder(node.left) preorder(node.right) vals = [] preorder(root) return ' '.join(vals) def deserialize(self, data): return data; def buildTree(self, preorder, inorder): def build(stop): if inorder and inorder[-1] != stop: root = TreeNode(preorder.pop()) root.left = build(root.val) inorder.pop() root.right = build(stop) return root preorder.reverse() inorder.reverse() return build(None)

What are complementary colors?

colors directly opposite each other in the color spectrum, such as red and green or blue and orange, that when combined in the right proportions, produce white light.

Nice is..

complacent and conciliatory

The parent of a child of a binary heap represented as an array is at what index (1-index and 0-index)?

floor(k/2); Parent is at floor((k-1)/2);

What is the system call used for new processes?

fork()

Linux creates every process using which two system calls?

fork(2), clone(2)

Never take girls advice...

from girls

Code up a solution to the max sum subarray problem.

function maxSumSubarray(nums){ let maxOverall = 0; let maxEndingHere = 0; for (let i = 0; i < nums.length; i++){ maxEndingHere = Math.max(maxEndingHere + nums[i], nums[i]); maxOverall = Math.max(maxEndingHere, maxOverall); } return maxOverall; } function maxSumSubarray(nums){ let maxOverall = nums[0]; let maxEndingHere = nums[0]; for (let i = 1; i < nums.length; i++){ maxEndingHere = Math.max(maxEndingHere + nums[i], nums[i]); maxOverall = Math.max(maxEndingHere, maxOverall); } return maxOverall; }

STAT244: In R make a matrix 3 rows high, 4 cols wide, w/ all fields equalling 0.

matrix(0,3,4)

STAT244: How do you fill a matrix with vector values in R?

matrix(vec,3,4)

Describe three parts of delts

medial - side, anterior - front, posterior - back

Sex is...

natural

What is another term for big endian?

network byte order

Linux Permissions: rwx rwx rwx applies to who in what order?

owner(u), group(g), all users(a)

AND

p 408 Bitwise AND Rd = Rn AND imm

What is momentum in physics?

p = m*v

parameters vs arguemnts

parameters are variables in the declaration of the function argument is the actual value of this variable that gets passed to the function

D3 FEM Points: What is the callback to selection.attr expecting?

selection.attr(name[, value]) <> If a value is specified, sets the attribute with the specified name to the specified value on the selected elements and returns this selection. If the value is a constant, all elements are given the same attribute value; otherwise, if the value is a function, it is evaluated for each selected element, in order, being passed the current datum (d), the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). The function's return value is then used to set each element's attribute. A null value will remove the specified attribute.

D3 FEM: selection.data?

selection.data([data[, key]]) <> Joins the specified array of data with the selected elements, returning a new selection that represents the update selection: the elements successfully bound to data. Also defines the enter and exit selections on the returned selection, which can be used to add or remove elements to correspond to the new data. The specified data is an array of arbitrary values (e.g., numbers or objects), or a function that returns an array of values for each group. When data is assigned to an element, it is stored in the property __data__, thus making the data "sticky" and available on re-selection.

socket()

socket() creates an endpoint for communication and returns a descriptor.

Are Caches built into CPUs?

sometimes! http://superuser.com/questions/196143/where-exactly-l1-l2-and-l3-caches-located-in-computer# As of recently, they're more likely to be on the chip for fastest access (at least L1 is very likely).

How does String.prototype.replace() work?

str.replace(regexp|substr, newSubStr|function) Return val: A new string with some or all matches of a pattern replaced by a replacement. Pretty crazy. Callback takes in following params: **match** -- The matched substring. (Corresponds to $& above.) **p1, p2, ..**. -- The nth parenthesized submatch string, provided the first argument to replace() was a RegExp object. (Corresponds to $1, $2, etc. above.) For example, if /(\a+)(\b+)/, was given, p1 is the match for \a+, and p2 for \b+. offset (Note that this means that the # of callback args varies and this only works for capturing groups AFAIK) **offset** -- the offset of the matched substring within the whole string being examined. (For example, if the whole string was 'abcd', and the matched substring was 'bc', then this argument will be 1.) **string** -- The whole string being examined.

Explain ReactDom.Render()

three args: 1. element 2. container 3. callback returns a reference to the component. Render a React element into the DOM in the supplied container and return a reference to the component (or returns null for stateless components). If the React element was previously rendered into container, this will perform an update on it and only mutate the DOM as necessary to reflect the latest React element. If the optional callback is provided, it will be executed after the component is rendered or updated.

What is the relationship between inputs to a mux and selectors?

where n is inputs and m is selector m = log_2n

JS: Three properties of objects?

writable, configurable, enumerable

Describe the top-down w/memoization d.p. method

write procedure recurisively in a natural manner, but save result of each subproblem (in usually an array or htbl) procedure now checks to see if it hsas already solved the subproblem, if so, return that value, and save computation else compute value as usual.

How is addition implemented in binary?

xor to get sum, use and to get carry and repeat until carry is none.

sort() can take in a key and reverse values. explain

key is f() of an arg that is used to extrract a comparison key from each element.

$pgrep -u does what? $pgrep -v

list processes for a user, list processes not owned by a particular user. inverse works for grep too!!!

sort() vs sorted()

sort() in-place List.sort() returns None sorted() - returns new sorted list

Define these variables in AWK: $0, $1 $(NF-2) $NR

$0 - full line $1 - first field $(NF-2) - number of fields - 2 Awk NR gives you the total number of records being processed or line number.

How do you attach to a docker process?

$docker ps --> see what containers are running $docker attach <sha or name>

Say there's a user on a system named anthony running vim. How to kill all procs launched from his terminal? then kill his ssh terminal?

$w (find out what tty he's hooked to) $pkill -t pts/1 $pkill -u anthony sshd

React-Router v14: How do you group Rotes and render only the first that matches the path passed in?

<switch>

what does a docker file do? What does a docker-compose.yml file do?

. A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. Docker Compose (herein referred to as compose) will use the Dockerfile if you add the build command to your project's docker-compose.yml.

What is /dev/zero?

/dev/zero is a special file in Unix-like operating systems that provides as many null characters (ASCII NUL, 0x00) as are read from it.

What are the 5 properties in defining a B-Tree of order m?

1. A node has at most "m" children 2. A node with k children has k-1 keys 3. Any inner node has at least ceiling (m/2 children) 4. All leaves must be at same depth. 5. Root must have at least 2 children

Order the SQL statements for execution: SELECT DISTINCT column, AGG_FUNC(column_or_expression), ... FROM mytable JOIN another_table ON mytable.column = another_table.column WHERE constraint_expression GROUP BY column HAVING constraint_expression ORDER BY column ASC/DESC LIMIT count OFFSET COUNT;

1. FROM and JOIN 2. WHERE 3. GROUP BY 4. HAVING 5. SELECT 6. DISTINCT 7. ORDER BY 8. LIMIT / OFFSET https://sqlbolt.com/lesson/select_queries_order_of_execution

You can sometimes still perform a FTS on a DB table with an index on it. How so? (2 cases)

1. Where clause in columns has no matches of leading columns of index. 2. If where cluase doesnt prevents use of index i.e. NEQ, NOT, starting with wildcard %hello%

React-Router v14: Routes have three props that can be used to define what should be rendered, what are they?

1. component - A React component 2. render - a function that returns a React Element. 3. children - A function that returns a React element.

Redux: What are the 3 principles of redux?

1. single source of truth The state of your whole application is stored in an object tree within a single store. 2. state is read-only "Action" The only way to change the state is to emit an action, an object describing what happened. 3. Changes are made with pure functions To specify how the state tree is transformed by actions, you write pure reducers.

repository

A repository is a collection of commits, each of which is an archive of what the project's working tree looked like at a past date, whether on your machine or someone else's. It also defines HEAD which identifies the branch or commit the current working tree stemmed from. Lastly it contains a set of branches and tags to identify certain commits by name.

Describe the TSVECTOR type in Postgres

A tsvector is a sorted list of distinct lexemes that are words that have been normalized to make different variants of the same word look alike. For example, normalization almost always includes folding upper-case letters to lower-case and often involves removing suffixes. This allows searches to find variant forms of the same word w/o tediously entering all the possible variants.

What's a view in a databasE?

A view is just a way to get results set of a query. It is really just a view. It may be slightly faster but for efficiency, it's rpreferred to just use materialized views.

Description and opposite of abduction - examples

Abduction refers to a motion that pulls a structure or part away from the midline of the body. Opposite of adduction. (Splits : legs are abducted at the hips)

What does ACID stand for and define each one?

Atomicity - Atomicity requires that each transaction be "all or nothing": if one part of the transaction fails, then the entire transaction fails, and the database state is left unchanged. An atomic system must guarantee atomicity in each and every situation, including power failures, errors and crashes. To the outside world, a committed transaction appears (by its effects on the database) to be indivisible ("atomic"), and an aborted transaction does not happen Consistency - The consistency property ensures that any transaction will bring the database from one valid state to another. Any data written to the database must be valid according to all defined rules, including constraints, cascades, triggers, and any combination thereof. This does not guarantee correctness of the transaction in all ways the application programmer might have wanted (that is the responsibility of application-level code), but merely that any programming errors cannot result in the violation of any defined rules. Isolated - The isolation property ensures that the concurrent execution of transactions results in a system state that would be obtained if transactions were executed sequentially, i.e., one after the other. Providing isolation is the main goal of concurrency control. Depending on the concurrency control method (i.e., if it uses strict - as opposed to relaxed - serializability), the effects of an incomplete transaction might not even be visible to another transaction. Durable - The durability property ensures that once a transaction has been committed, it will remain so, even in the event of power loss, crashes, or errors. In a relational database, for instance, once a group of SQL statements execute, the results need to be stored permanently (even if the database crashes immediately thereafter). To defend against power loss, transactions (or their effects) must be recorded in a non-volatile memory.

What does BASE stand for in NoSQL?

BASE - Basically Available, Soft State, Eventually Consistent

In postgres create a table called products with 3 columns product_no, name, price, not null on product_no and name

CREATE TABLE products ( product_no integer NOT NULL, name text NOT NULL, price numeric );

What is a databse index?

Data structure that improves speed of data retrieval ops at cost of additional writes and storage space to hold the index data structure.

React-Router v14: Explain <Route>

Expects a a path prop string to describe pathname to match and uses the package "path-to-regexp"

list.extend(iterable)

Extend the list by appending all the items from the iterable. Equivalent to a[len(a):] = iterable.

What are prepared statements?

In DBMS, feature used to execute similar db statements faster. Reduces overhead of compiling and opimtizing the statement.

What is a database cursor?

In computer science, a database cursor is a control structure that enables traversal over the records in a database. Cursors facilitate subsequent processing in conjunction with the traversal, such as retrieval, addition and removal of database records. The database cursor characteristic of traversal makes cursors akin to the programming language concept of iterator. Cursors are used by database programmers to process individual rows returned by database system queries. Cursors enable manipulation of whole result sets at once. In this scenario, a cursor enables the rows in a result set to be processed sequentially. In SQL procedures, a cursor makes it possible to define a result set (a set of data rows) and perform complex logic on a row by row basis. By using the same mechanics, a SQL procedure can also define a result set and return it directly to the caller of the SQL procedure or to a client application. A cursor can be viewed as a pointer to one row in a set of rows. The cursor can only reference one row at a time, but can move to other rows of the result set as needed.

list.insert(i, x)

Insert an item at a given position. The first argument is the index of the element before which to insert, so a.insert(0, x) inserts at the front of the list, and a.insert(len(a), x) is equivalent to a.append(x).

How are generators more memory efficient?

Instead of creating a function which returns a list of values, one can write a generator which generates the values on the fly. This means that no list needs to be constructed, meaning that the resulting code is more memory efficient. In this way one can even describe data streams which would simply be too large to fit in memory.

What does it mean to fast-forward in git?

It means to just move the pointer for the branch up a bunch of commits and to have an updated branch.

How many processes can run on a single CPU?

Only one process can run at a time on a single CPU. All other processes have to wait or be in some other state. This is why a process that is not running appears in a different state. States include the following: • Runnable state • Sleeping state • Uninterruptable sleep state • Defunct or Zombie state https://access.redhat.com/sites/default/files/attachments/processstates_20120831.pdf

Description and opposite of flexion - examples

Opposite of flexion is extension: Flexion is decreasing the angle between two body parts. When sitting down the knees are flexed.

list.pop([i])

Remove the item at the given position in the list, and return it. If no index is specified, a.pop() removes and returns the last item in the list. (The square brackets around the i in the method signature denote that the parameter is optional, not that you should type square brackets at that position. You will see this notation frequently in the Python Library Reference.)

list.copy()

Return a shallow copy of the list. Equivalent to a[:].

list.count(x)

Return the number of times x appears in the list.

list.index(x[, start[, end]])

Return zero-based index in the list of the first item whose value is x. Raises a ValueError if there is no such item. The optional arguments start and end are interpreted as in the slice notation and are used to limit the search to a particular subsequence of the list. The returned index is computed relative to the beginning of the full sequence rather than the start argument.

list.reverse()

Reverse the elements of the list in place.

External Rotation

Rotation of body parts is referred to as internal or external, referring to rotation towards or away from the center of the body.[20] Internal rotation (or medial rotation) refers to rotation towards the axis of the body.[20] External rotation (or lateral rotation) refers to rotation away from the center of the body.[20

What is a stored procedure?

Stored procedures are a sequence of instructions in PL/SQL language. Is a programming language implemented by some DBMS, that lets you store sequences of queries frequently applied to your model, and share the processing load with the application layer. Prepared statements are queries written with placeholders instead of actual values. You write the query and it is compiled just once by the DBMS, and then you just pass values to place into the placeholders. The advantage of using prepared statements is that you enhance the performance considerably, and protect your applications from SQL Injection. The difference is you cant store prepared statements. You must "prepare" them every time you need to execute one. Stored procedures, on the other hand, can be stored, associated to a schema, but you need to know PL/SQL to write them. You must check if your DBMS supports them. Both are very usefull tools, you might want to combine. Hope this short explanation to be useful to you!

What is an IDL? What is Apache Thrift?

This is where Apache Thrift comes in. It has its own "Interface Definition Language" (IDL). In this language you define what are the functions and what are their parameters. And then use Thrift compiler to generate corresponding code for any language of your choice. What this means, is that you can implement a function in java, host it on a server and then remotely call it from python.

How are coroutines like mutual recursion?

Using coroutines for state machines or concurrency is similar to using mutual recursion with tail calls, as in both cases the control changes to a different one of a set of routines. However, coroutines are more flexible and generally more efficient. Since coroutines yield rather than return, and then resume execution rather than restarting from the beginning, they are able to hold state, both variables (as in a closure) and execution point, and yields are not limited to being in tail position; mutually recursive subroutines must either use shared variables or pass state as parameters. Further, each mutually recursive call of a subroutine requires a new stack frame (unless tail call elimination is implemented), while passing control between coroutines uses the existing contexts and can be implemented simply by a jump.

What datastructure is used fo rindices on DBs?

Usually a b-tree, sometimes hashtables, or other specifc data structures.

Branch

a branch is just a name for a commit also called a refernce. It's the parentage of a commit which defines its history.

Commit

a commit is a snapshot of your working tree at some point in time. The state of HEAD at the time of your commit is made becomes that commit's parent. This is what creates the notion of a "revision history"

Donald knuth says, "Subroutines are special cases of ..."

coroutines


संबंधित स्टडी सेट्स

Physical Science (Mrs.Thomas) Final Exam

View Set

NYS Wildlife Rehabilitation EXAM » Diseases

View Set

Disability Income and Related Insurance, 8 questions

View Set

Community Mental Health Exam 2-Hay

View Set

Driver's Ed Study Questions for Final

View Set

Chapter 45 GI - Gallbladder, Liver, Biliary Tract and Exocrine Pancreatic Disorders

View Set