Pseudocode for sum, product and difference given implicit functions A and B

I have no idea how to do this. All I know is that I have two implicit functions, and I need to write the sum, product and difference of them in pseudocode. I tried to write it for sum and difference but I don’t really know what I’m doing. Any help is appreciated.

click here for functions


How to compute the difference between position vectors in c++ [closed]

I am an 2nd year engineering student with very little experience with anything to do with coding. I am working on a design project where we are building an X-Y Plotter to generate “random” motion in a rainfall simulator that is being used in a lab.

I have been able to write a program in C++ that will generate an x_coordinate and a y_coordinate as you can see below. I was wondering if anyone had suggestions on how I could store the position it is currently at [x1,y1] and find the distance to the second position [x2, y2] from that last position.

I am hoping my final result will be a program which:
Step 1: Generates a position.
Step 2: Moves to that position.
Step 3: Generates a new position.
Step 4: Calculates the distance to the new position.
Step 5: Repeat steps 2-4

Any advice or direction on what to research would save me lots of time. Thanks!

#include <iostream> #include <stdlib.h>     /* srand, rand */ #include <stdio.h>      /* printf, NULL */ #include <random>  float x_position; float y_position; float x_coordinate; float y_coordinate; int x_MAX; int y_MAX; int i = 0; int positionCount = 100; using namespace std;   int main() {   //Create Limits      cout << "Enter Max Value for X:";         cin >> x_MAX;     cout << "Enter Max Value for Y:";     cin >> y_MAX;      srand(1);     //Generate Coordinates     while (i < positionCount) {          x_coordinate = rand() % x_MAX;         y_coordinate = rand() % y_MAX;          cout << "New Position Coordinate is: [" << x_coordinate << "," << y_coordinate << "]" <<endl;           i++;   }     return 0; } ``` 

Is there a difference between a rainbow table and a dictionary attack?

I’m trying to learn a bit more about the different types of attacks but as far as I understand it, a rainbow table is a large collection of prehashed data which is the compared to hashed data gathered from a target. A dictionary seems very similar but I’m struggling to find anything that can specify the differences between the two, if there are any.

Many thanks!

Difference between the SRD and the Basic Rules

This question came up in the context of this question: Is D&D Beyond an official rules source? since there was brief discussion about how the SRD is not considered official and I wondered if the Basic Rules were/weren’t as well (that is not the scope of this question).

Are there any differences between the Basic Rules and the SRD?

Do they have different purposes, content, publishing methods (for example)? Does it have to do with licensing?

If they are the same, why are they referred to as two separate things with separate names?

What is the difference between a Type and an Abstract Type?

In my data structures course we are given definitions for Type and Abstract Type but they confuse me.

A type is a set of values and the operations you can do on them. The set of operations is called an interface.

Wait, what? Do this mean that Type = set of values + interface?

An Abstract Type is a type only accessible through its interface.

I fail to see how this differ from the Type definition. You always need to use the interface in order to do anything with the set of values. Are there types that can be accessed without having a set of operations defined on them a.k.a an interface?

What’s the difference between phi and lambda in regular expression?

I’ve been learning on Formal Languages and Automata of Peter Linz(6th edition).

in the chapter 3 of this book, it explains the primitive regular expression.

but I don’t know what is the difference between $ \phi$ and $ \lambda$ .

of course, I know $ \lambda$ means the empty string, so that $ \lambda s=s\lambda$ .

and the textbook explains the meaning of $ \phi$ is the empty set.

and more, the textbook explains that $ \phi$ can be accepted by a deterministic finite automata $ \left< Q, \Sigma, \delta, q_0 , F \right>$ in which $ Q=\{ q_0, q_1 \}$ , $ \forall a \in \Sigma:\delta(q_0,a)\text{ is not defined}$ , and $ F=\{q_1\}$ .

so, I guess the meaning of the $ \phi$ is the rejected string.

but How can the expression $ (\phi *)*$ mean $ \lambda$ ?

and what’s the meaning of the expression $ a\phi$ ?

What is the difference between masking and tolerating failures?

Distributed Systems 5ed by Coulouris says on p21-22

1.5.5 Failure handling

Detecting failures: Some failures can be detected. For example, checksums can be used to detect corrupted data in a message or a file. Chapter 2 explains that it is difficult or even impossible to detect some other failures, such as a remote crashed server in the Internet. The challenge is to manage in the presence of failures that cannot be detected but may be suspected.

Masking failures: Some failures that have been detected can be hidden or made less severe. Two examples of hiding failures:

  1. Messages can be retransmitted when they fail to arrive.

  2. File data can be written to a pair of disks so that if one is corrupted, the other may still be correct.

Just dropping a message that is corrupted is an example of making a fault less severe – it could be retransmitted. The reader will probably realize that the techniques described for hiding failures are not guaranteed to work in the worst cases; for example, the data on the second disk may be corrupted too, or the message may not get through in a reasonable time however often it is retransmitted.

Tolerating failures: Most of the services in the Internet do exhibit failures – it would not be practical for them to attempt to detect and hide all of the failures that might occur in such a large network with so many components. Their clients can be designed to tolerate failures, which generally involves the users tolerating them as well. For example, when a web browser cannot contact a web server, it does not make the user wait for ever while it keeps on trying – it informs the user about the problem, leaving them free to try again later. Services that tolerate failures are discussed in the paragraph on redundancy below.

Recovery from failures: Recovery involves the design of software so that the state of permanent data can be recovered or ‘rolled back’ after a server has crashed. In general, the computations performed by some programs will be incomplete when a fault occurs, and the permanent data that they update (files and other material stored in permanent storage) may not be in a consistent state. Recovery is described in Chapter 17.

Redundancy: Services can be made to tolerate failures by the use of redundant components. Consider the following examples:

  1. There should always be at least two different routes between any two routers in the Internet.

  2. In the Domain Name System, every name table is replicated in at least two different servers.

  3. A database may be replicated in several servers to ensure that the data remains accessible after the failure of any single server; the servers can be designed to detect faults in their peers; when a fault is detected in one server, clients are redirected to the remaining servers.

What is the difference between masking and tolerating failures?

Can they both be done by redundancy?

Do they both need to perform recovery from failures?


Is there a difference between editing HTTP messages manually or with burp for example? (WebGoat HTTP intercept exercise “problem”)

I am diving now into WebGoat, there’s this little exercise in the “general” tab calle d “http proxies” which asks you to use zap/burp to intercept and modify a request, this is what is being us asked.

enter image description here

I understood what is being us asked to do, but I don’t understand why if I change it manually it doesn’t work, whereas if I use the burp button “change request method” does, as it’s the same text at the end, am I missing something?

This is the original request

And here after I modify it with the button

The only difference is that I write that GET string manually and then add the ?changeMe=Requests+are+tampered+easily I don’t understand why it won’t work and it’s driving me nuts.

Oh and another thing, if I enter the x-request-intercepted:true below Cookie sometimes wont work, is it being considered body or what? (there isn’t a break line)