Questions
What are the differences and similarities in Bing and Google Webmaster Guidelines?

What are the differences and similarities in Bing and Google Webmaster Guidelines?

In: Computer Science

What is internal and external fragmentation. Explain circumstances where one might be preferred over the other...

What is internal and external fragmentation. Explain circumstances where one might be preferred over the other

List one similarity and one difference between paged memory and demand paging memory allocation. Explain two (2) circumstances where one might be preferred over the other.

What are the fundamental differences between paging scheme and segmented memory allocation? List both advantages and disadvantages of each neatly using tables

Which (3) tables are used by the memory manger to keep track of the segments in memory? Describe each table.

Why are segmentation problem like, compaction and external fragmentation removed in the combined segmented/demand paged memory allocation?

Give an example of each, first-in-first out (FIFO) and least-recently–used (LRU) policy.

In: Computer Science

language: python A local biologist needs a program to predict population growth. The inputs would be:...

language: python

A local biologist needs a program to predict population growth. The inputs would be:

  1. The initial number of organisms, as an int
  2. The rate of growth (a real number greater than 1), as a float
  3. The number of hours it takes to achieve this rate, as an int
  4. A number of hours during which the population grows, as an int

For example, one might start with a population of 500 organisms, a growth rate of 2, and a growth period to achieve this rate of 6 hours. Assuming that none of the organisms die, this would imply that this population would double in size every 6 hours. Thus, after allowing 6 hours for growth, we would have 1000 organisms, and after 12 hours, we would have 2000 organisms.

Write a program that takes these inputs and displays a prediction of the total population.

An example of the program input and output is shown below:

Enter the initial number of organisms: 10
Enter the rate of growth [a real number > 1]: 2
Enter the number of hours to achieve the rate of growth: 2
Enter the total hours of growth: 6

The total population is 80

also make sure it test for these cases

Test Case 1

Test for 100 organisms with growth rate of 5 over 2 hrs over 25 hrs total

Test Case 2

Test for 10 organisms with growth rate of 2 over 2 hrs over 6 hrs total

Test Case 3

Test for 0 organisms with growth rate of 5 over 1 hr over 6 hrs total

Test Case 4

Test for 7 organisms with growth rate of 7 over 7 hrs over 7 hrs total

In: Computer Science

Using C language 0. (3pts.) Using opendir() and readdir(), open the current directory and output all...

Using C language

0. (3pts.)
Using opendir() and readdir(), open the current directory and output all filenames until there are no more. Include a main that does this below.

1. (4pts.)
Parse the dirent struct to see if an entry is a directory or a file. If it is a directory, prepend "./" to the filename before printing it out. Include a main that does this below.

2. (3pts.)
Open a file handle to each file, use lseek to determine the file's size in bytes and print out the file's size in bytes next to its name. Include a main that does this below.

EX. (3pts.)
Add a color formatting element. Print out executable binaries in bold red, regular files in light green, directories in light blue and anything else in white. Be careful - changing the console printout color is a durable operation that is global in scope, so once you change the color, anything printed from anywhere in your Process will be in in that color. It is a good practice to always presume the color is incorrectly set before you print and to set it to what you want before you print anywhere (especially in informational or error outputs). You will also need to find a way to determine if a file is executable or not

In: Computer Science

Java Assignment: The layout of Farmer John's farm is quite peculiar, with a large circular road...

Java Assignment:

The layout of Farmer John's farm is quite peculiar, with a large circular road running around the perimeter of the main field on which his cows graze during the day. Every morning, the cows cross this road on their way towards the field, and every evening they all cross again as they leave the field and return to the barn.

As we know, cows are creatures of habit, and they each cross the road the same way every day. Each cow crosses into the field at a different point from where she crosses out of the field, and all of these crossing points are distinct from each-other. Farmer John owns exactly 26 cows, which he has lazily named A through Z (he is not sure what he will do if he ever acquires a 27th cow...), so there are precisely 52 crossing points around the road. Farmer John records these crossing points concisely by scanning around the circle clockwise, writing down the name of the cow for each crossing point, ultimately forming a string with 52 characters in which each letter of the alphabet appears exactly twice. He does not record which crossing points are entry points and which are exit points.

Looking at his map of crossing points, Farmer John is curious how many times various pairs of cows might cross paths during the day. He calls a pair of cows (a,b)(a,b) a "crossing" pair if cow aa's path from entry to exit must cross cow bb's path from entry to exit. Please help Farmer John count the total number of crossing pairs.

INPUT FORMAT (file circlecross.in):

The input consists of a single line containing a string of 52 upper-case characters. Each letter of the alphabet appears exactly twice.

OUTPUT FORMAT (file circlecross.out):

Please print the total number of crossing pairs.

SAMPLE INPUT:

ABCCABDDEEFFGGHHIIJJKKLLMMNNOOPPQQRRSSTTUUVVWWXXYYZZ

SAMPLE OUTPUT:

1

In this example, only cows A and B are a crossing pair.

In: Computer Science

Write two Java programs and verify that they work. Program 1 should: Read a UTF-8 encoded...

Write two Java programs and verify that they work.

Program 1 should:

  • Read a UTF-8 encoded text file
  • Print to the console the hex values for the bytes it read in.
  • Convert the text to UTF-16
  • Print to the console the hex values for the converted bytes
  • Write the UTF-16 text to a file

Program 2 should do the same as program 1, except program 2 goes from UTF-16 to UTF-8

Note: we are supposed to write two java programs, the first program should read utf8 encoded text file and the second program should write utf16 text file. So, if you can give me the java code that can read and write utf8 and utf16 text files respectively , I would be happy. Thank you.

In: Computer Science

Linux project deployment Script Create a script “setup.sh” to automate the deployment of a flask application....

Linux project deployment Script

Create a script “setup.sh” to automate the deployment of a flask application. The script must install all software dependencies such as:

  1. Python3

  2. Pip3

  3. Git

Use github to clone this repository.

Install the dependencies given in requirements.txt

Start the server by executing the following command “gunicorn wsgi:app”

requirements.txt

Click==7.0

Flask==1.0.2

Flask-Cors==3.0.7

Flask-JWT==0.3.2

Flask-SQLAlchemy==2.3.2

gunicorn==19.9.0

itsdangerous==1.1.0

Jinja2>=2.10.1

MarkupSafe==1.1.1

PyJWT==1.4.2

six==1.12.0

SQLAlchemy==1.3.1

werkzeug>=0.15.3

In: Computer Science

You have developed the overall Virtual Private Cloud (VPC) design for the cloud initiative for Get-Sole...

You have developed the overall Virtual Private Cloud (VPC) design for the cloud initiative for Get-Sole Shoes. Now it is time to examine the infrastructure that would be used within the VPC.

From this week’s reading, review the use of Elastic Compute Cloud (EC2) within a VPC for the servers that will be needed for the company.

Respond to the following in a minimum of 175 words:

  • Discuss possible EC2 designs that can be used for the company. Discuss your rationale for your EC2 recommendations and remember to keep cost (four pillars of cost optimization) as part of your recommendations.

In: Computer Science

1)If an algorithm performs N steps then we say it is O(N) ? 2) An example...

1)If an algorithm performs N steps then we say it is O(N) ?

2) An example of something that is O(N) is(chose one)

A)printing to the screen.B)executing a conditional statement. C) initializing an integer variable. D) looping through an array of size N.

3)Suppose we found the run time of an algorithm was O(2N3 + 4N2 + 5N + 3). What is the Big O notation for the algorithm?

A) O(5N), B) O(4N^2), C) O(N^3), D) O(2N^3)

In: Computer Science

Multiplication of Matrix is one of the tasks that takes time to compute. Note that the...

Multiplication of Matrix is one of the tasks that takes time to compute. Note that the time complexity of multiplying two square matrix is o(n^3) using the nested loops method, and Strassen algorithm improves it to O(n^2.8074). Multi-threading can be used to further enhance this.

Using the matrices below, write

(a) a serial program (the normal nested loops method) to perform the multiplication.

(b) a multithreaded program using pthreads to perform this computation.

(c) compare the execution times of (a) and (b) in a table.

In: Computer Science

TASK: Your task is as follows: (1) Place SN74LS42N (4 to 10 decoder) on a breadboard;...

TASK: Your task is as follows:
(1) Place SN74LS42N (4 to 10 decoder) on a breadboard;
(2) Connect IC pin 8 to GND and IC pin 16 to +5 V for IC to get powered;
(3) Connect GPIO pins to BCD inputs, as follows:
- connect GPIO pin 12 to IC pin 12 (8’s column),
- connect GPIO pin 16 to IC pin 13 (4’s column),
- connect GPIO pin 20 to IC pin 14 (2’s column) and
- connect GPIO pin 21 to IC pin 15 (1’s column).
(4) Connect GPIO pins to DEC Outputs, as follows:
- connect GPIO pin 25 to IC pin 9,
- connect GPIO pin 8 to IC pin 10,
- connect GPIO pin 7 to IC pin 11,
- connect GPIO pin 26 to IC pin 1,
- connect GPIO pin 19 to IC pin 2,
- connect GPIO pin 13 to IC pin 3,
- connect GPIO pin 6 to IC pin 4,
- connect GPIO pin 5 to IC pin 5,
- connect GPIO pin 11 (SCLK) to IC pin 6 and
- connect GPIO pin 9 (MISO) to IC pin 7.
(5) Connect LEDs and resisters, as follows:
- connect LEDs’ anode (+) to GPIO pins 12, 16, 20 and 21,
- connect LEDs’ cathode (-) to one end of resisters and
- connect the other end of resisters to GND.
(6) Develop a python program to generate a random number using random.randint(0,9) (you need import random) and assign this generated number to DEC, instead of manual input. Convert the random number DEC to a 4-bit binary number and generate the binary signal based on the binary number. Check which decimal outputs D0 – D9 are true/false (on/off).

In: Computer Science

Draw the red-black BST that results when you insert letters A through K int order into...

Draw the red-black BST that results when you insert letters A through K int order into an initially empty tree, then describe what happens in general when trees are built by insertion of keys in ascending order. What about descending order?

In: Computer Science

1. Write the set { x | x ∈ R, x2 = 4 or x 2...

1. Write the set { x | x ∈ R, x2 = 4 or x
2 = 9} in list form.
2. {x: x is a real number between 1 and 2} is an
a) finite set
b) empty set
c) infinite set
3. Write set {1, 5, 15, 25,…} in set-builder form.
4. What is the cardinality of each of these sets?
a) {{a}}
b) {a, {a}}
c) {a, {a}, {a, {a}}}
d) {∅}
e) {∅, {∅}, {∅, {∅}}}
5. Suppose that A is the set of sophomores at your school and B is the set of students in
discrete mathematics at your school. Express the following set in terms of A and B:
"the set of students at your school who either are not sophomores or are not taking discrete
mathematics"
a. A
c ∩ Bc
b. A
c U B
c
c. B-A
d. A-B
6. Let A be the set of students who live within one mile of school and let B be the set of
students who walk to classes. Describe the set B-A.
a. The set of students who walk to classes but live more than 1 mile away from school.
b. The set of students who walk to classes but live within 1 mile away from school.
c. The set of students who walk to classes.
7. What is the power set of the set {1, a, b}?
8. Let S = {∅, ?,{?}}Determine whether each of these is an element of S, a subset of S, neither,
or both.
a) {?}
b) {{?}}
c) ∅
d) { {∅ }, ?}}
8. Determine whether each of these statements is true or false.
a) 0 ∈ ∅
b) ∅ ∈ {0}
c) {0} ⊂ ∅
d) ∅ ⊂ {0}
e) {0} ∈ {0}
f) {0} ⊂ {0}
g) {∅} ⊆ {∅}
9. Let A = {a, b, c}, B = {x, y}, and C = {0, 1}.
Find A × B × C.
10. Find A2
if A = {0, a, 3}.

In: Computer Science

You are experiencing issues when trying to transfer files between two computers using FTP. What could...

You are experiencing issues when trying to transfer files between two computers using FTP. What could be the potential cause(s) of the issue? Select all that apply.

Server is not able to resolve the client IP address

Inbound port UDP 21 is blocked in the server

The remote host does not allow connections on high ports 49152 - 65535

Inbound port TCP 21 is blocked in the server

Client is not able to resolve the remote IP address

Which of the following best describes the function of the TTL/hop limit for IP packages?

Prevents a computer from keeping the same IP forever, which could potentially cause IP address conflicts in the network (perhaps due to incorrect DHCP configuration)

Tells the client for how long it should cache the local ephemeral port used in a TCP connection to allow fast reconnections

Indicates to the server for how long it should keep a TCP connection with a specific client to mitigate denial-of-service (DoS) attack

Prevents IP packets from getting stuck in infinite routing loops (perhaps due to incorrect routing tables)

In: Computer Science

Use VB.net to create a loop that posts the first 100 prime numbers. Then, write code...

Use VB.net to create a loop that posts the first 100 prime numbers. Then, write code to confirm the numbers are prime.

In: Computer Science