When implementing SEO techniques into a website, what are some practices that should be avoided?
In: Computer Science
Add a function to Programming Challenge 7 that allows the user
to search the structure array for a particular customer's account.
It should accept part of the customer's name as an argument and
then search for an account with a name that matches it. All
accounts that match should be displayed. If no account matches, a
message saying so should be displayed. Currently I have
#include <iostream>
#include <string>
using namespace std;
void displayAccount(struct customerAccount Arr[], int index);
void changeAccount(struct customerAccount Arr[], int index, int
num);
void createNewAccount(struct customerAccount Arr[], int
index);
void menu();
const int SIZE = 2;
struct customerAccount
{
string name, address, city, state, zip, phone,
date;
double balance;
};
int main()
{
int choice = 0;
int num = 0;
int index = 1;
customerAccount Arr[2];
menu();
cout << "Please enter a choice: 1-4\n";
cin >> choice;
{
switch (choice)
{
case 1:
createNewAccount(Arr, index);
index++;
cout <<
"Make another choice 1-4: \n";
cin >>
choice;
case 2:
cout <<
"Enter the customer number you would like to change the account
information of " << endl;
cin >>
num;
changeAccount(Arr, num, index);
break;
case 3:
displayAccount(Arr, choice);
system("pause");
case 4:
return 0;
default:
cout <<
"Please enter a valid choice ";
cout <<
"between 1 and 4:" << endl;
menu();
cout <<
"Please enter a choice: ";
cin >>
choice;
}
}
return 0;
}
void menu()
{
cout << "****************************" <<
endl;
cout << "\n \t MENU \n" << endl;
cout << "****************************" <<
endl;
cout << "1. Enter new account information"
<< endl;
cout << "2. Change account information" <<
endl;
cout << "3. Display all account information"
<< endl;
cout << "4. Exit the program" <<
endl;
}
void displayAccount(struct customerAccount Arr[], int index)
{
for (int i = 0; i < SIZE; i++)
{
cout << "The Customer's name
is " << Arr[i].name << endl;
cout << "The Customer's
address is " << Arr[i].address << endl;
cout << "Customer City is "
<< Arr[i].city << ", ";
cout << Arr[i].state <<
"\n Area code: " << Arr[i].zip << endl;
cout << "Their phone number
is " << Arr[i].phone << endl;
cout << "Their account
creation date is " << Arr[i].date << endl;
cout << "Their account
balance is " << Arr[i].balance << endl;
}
}
void changeAccount(struct customerAccount Arr[], int index, int
num)
{
cout << "enter the new Customer name:
";
cin.ignore();
getline(cin, Arr[num].name);
cout << "enter the new Customer address:
";
getline(cin, Arr[num].address);
cout << "enter the new City: ";
getline(cin, Arr[num].city);
cout << "enter the new State: ";
getline(cin, Arr[num].state);
cout << "enter the new ZIP Code: ";
getline(cin, Arr[num].zip);
cout << "enter their telephone number: ";
getline(cin, Arr[num].phone);
cout << "Account balance, postive numbers only:
";
cin >> Arr[num].balance;
if (Arr[num].balance < 0)
{
cout << "this is not a valid
balance.\n";
cout << "please enter another
balance";
cin >>
Arr[num].balance;
}
cout << "enter a date of last payment: ";
cin.ignore();
getline(cin, Arr[num].date);
}
void createNewAccount(customerAccount Arr[], int index)
{
cout << "enter a Customer name: ";
cin.ignore();
getline(cin, Arr[index].name);
cout << "enter a Customer address: ";
getline(cin, Arr[index].address);
cout << "enter their City: ";
getline(cin, Arr[index].city);
cout << "enter their State: ";
getline(cin, Arr[index].state);
cout << "enter their ZIP Code: ";
getline(cin, Arr[index].zip);
cout << "Telephone: ";
getline(cin, Arr[index].phone);
cout << "Account balance: ";
cin >> Arr[index].balance;
cout << "Date of last payment: ";
cin.ignore();
getline(cin, Arr[index].date);
}
How do I make a sort function for this?
In: Computer Science
Write a C program that generates the following 2D array.
64 32 16 8
4 2 1
32 32 16 8
4 1 1
16 16 16 8
4 2 1
8 8 8 8
4 2 1
4 4 4 4
4 2 1
2 2 2 2
2 2 1
1 1 1 1
1 1 1
In: Computer Science
1- Discuss the basic steps of an implementation strategy to apply various networking technologies at the campus network (Hint: consider different technologies following the TCP/IP network model).
2-Discuss An optimized routing and addressing for the campus backbone that interconnects buildings, provides access to the server farm and routes traffic to the Internet.
3- Discuss the considered performance and security metrics on the edge of the network where the traffic is routed to and from the network.
4- What additional hardware and protocols are required for transforming the data network to handle real-time voice communications within the campus network ?
In: Computer Science
1. Practice Tasks
Aims: to simulate the principles and key technology in operating systems. You need to analyze, design, implement and debug a program which simulates the chosen principles or technology. You need to finish the following tasks to do the practice:
1) CPU scheduling algorithms (including FCFS, SJF, Priority Scheduling, Round Robin)
2) Process Synchronization (including producer and consumer problem, reader and writer problem, Dining-Philosophers Problem)
3) Page replacement algorithm (including FIFO, LRU, Optimal Algorithm)
4) Disk scheduling algorithm (including FCFS, SSTF, SCAN)
You need to implement the above 4 tasks to do the practice. You need to implement the input, algorithms and the output. The output will be different when you switch to different algorithms.
2. Requirements
1) Requirement analysis
2) Function design
3) Code preferebly in c/c++ or java
4) Report write-up
In: Computer Science
Python problem
I don't know how to arrive to the answer of this question:
"Rounded to the nearest integer, how much higher is the average sum of all six stats among Mega Pokemon than their non-Mega versions? Note that Mega Pokemon share the same Number (the first column) as their non-Mega versions, which will allow you to find all Pokemon that have a Mega version."
For this problem below. The format of the file is included at the bottom but it's not complete. If you want the complete one, let me know and I can email it to you.
#The line below will open a file containing information
#about every pokemon through Generation 7:
pokedex = open('../resource/lib/public/pokedex.csv', 'r')
#We've also provided a sample subset of the data in
#sample.csv.
#
#Each line of the file has 13 values, separated by commas.
#They are:
#
#
# - Number: The numbered ID of the Pokemon, an integer
# - Name: The name of the Pokemon, a string
# - Type1: The Pokemon's primary type, a string
# - Type2: The Pokemon's secondary type, a string (this
# may be blank)
# - HP: The Pokemon's HP statistic, an integer in the range
# 1 to 255
# - Attack: The Pokemon's Attack statistic, an integer in
# the range 1 to 255
# - Defense: The Pokemon's Defense statistic, an integer in
# the range 1 to 255
# - SpecialAtk: The Pokemon's Special Attack statistic, an
# integer in the range 1 to 255
# - SpecialDef: The Pokemon's Special Defense statistic, an
# integer in the range 1 to 255
# - Speed: The Pokemon's Speed statistic, an integer in the
# range 1 to 255
# - Generation: What generation the Pokemon debuted in, an
# integer in the range 1 to 7
# - Legendary: Whether the Pokemon is considered "legendary"
# or not, either TRUE or FALSE
# - Mega: Whether the Pokemon is "Mega" or not, either TRUE
# or FALSE
#
#Use this dataset to answer the questions below.
#Here, add any code you want to allow you to answer the
#questions asked below over on edX. This is just a sandbox
#for you to explore the dataset: nothing is required for
#submission here.
Number,Name,Type1,Type2,HP,Attack,Defense,SpecialAtk,SpecialDef,Speed,Generation,Legendary,Mega
1,Bulbasaur,Grass,Poison,45,49,49,65,65,45,1,FALSE,FALSE
2,Ivysaur,Grass,Poison,60,62,63,80,80,60,1,FALSE,FALSE
3,Venusaur,Grass,Poison,80,82,83,100,100,80,1,FALSE,FALSE
3,Mega
Venusaur,Grass,Poison,80,100,123,122,120,80,1,FALSE,TRUE
4,Charmander,Fire,,39,52,43,60,50,65,1,FALSE,FALSE
5,Charmeleon,Fire,,58,64,58,80,65,80,1,FALSE,FALSE
6,Charizard,Fire,Flying,78,84,78,109,85,100,1,FALSE,FALSE
6,Mega Charizard
X,Fire,Dragon,78,130,111,130,85,100,1,FALSE,TRUE
6,Mega Charizard
Y,Fire,Flying,78,104,78,159,115,100,1,FALSE,TRUE
7,Squirtle,Water,,44,48,65,50,64,43,1,FALSE,FALSE
8,Wartortle,Water,,59,63,80,65,80,58,1,FALSE,FALSE
9,Blastoise,Water,,79,83,100,85,105,78,1,FALSE,FALSE
9,Mega Blastoise,Water,,79,103,120,135,115,78,1,FALSE,TRUE
10,Caterpie,Bug,,45,30,35,20,20,45,1,FALSE,FALSE
11,Metapod,Bug,,50,20,55,25,25,30,1,FALSE,FALSE
12,Butterfree,Bug,Flying,60,45,50,90,80,70,1,FALSE,FALSE
13,Weedle,Bug,Poison,40,35,30,20,20,50,1,FALSE,FALSE
14,Kakuna,Bug,Poison,45,25,50,25,25,35,1,FALSE,FALSE
15,Beedrill,Bug,Poison,65,90,40,45,80,75,1,FALSE,FALSE
15,Mega Beedrill,Bug,Poison,65,150,40,15,80,145,1,FALSE,TRUE
16,Pidgey,Normal,Flying,40,45,40,35,35,56,1,FALSE,FALSE
17,Pidgeotto,Normal,Flying,63,60,55,50,50,71,1,FALSE,FALSE
18,Pidgeot,Normal,Flying,83,80,75,70,70,101,1,FALSE,FALSE
18,Mega
Pidgeot,Normal,Flying,83,80,80,135,80,121,1,FALSE,TRUE
19,Rattata,Normal,,30,56,35,25,35,72,1,FALSE,FALSE
20,Raticate,Normal,,55,81,60,50,70,97,1,FALSE,FALSE
In: Computer Science
PartA: Create the database. Name the database doctorWho. Then create a page that allows Doctor Who’s assistant to add a new patient record. You will need to give the assistant rights to this database. The assistant’s username is 'helper' and the password is 'feelBetter'. For this to work, you will need to create several pages so be sure to include all of them when submitting your work. Name the main page addPatient.php.
PartB: Add at least five records to the patient's table in the doctorWho database you created in PartA. Now create a page that will display three or more fields from each of these records. The display should consist of, at a minimum, the patient’s first and last names, and a unique identifier. Name the page getPatient.php and be sure to include the necessary accompanying files when you submit your work.
In: Computer Science
int main(){
int i = 3;
if(fork()){
i++;
fork();
i+=3;
}else{
i+=4;
fork();
i+=5;
}
printf("%d\n",i);
}
what is the output of the code
In: Computer Science
Course name object oriented programming.
3) Define the following methods:
- constructors: create two constructors with and without parameters.
- setName: this method sets the name of the School.
- getName: this method returns the name.
- setPhone: this method sets the phone number.
- getPhone: this method returns the phone number.
- setType: this method sets the type of the school.
- getType: this method returns the type of the school.
- toString: this method returns a string the contains the full information about a school.
In: Computer Science
In java coding, write a program that will print out a representation of a “W” using a character that a user provides.
In: Computer Science
Answer True or False for the following statements
Q1) NFS requires that NIS (yp) be running
Q2) Changes to the NIS database can be made on the slave server
Q3) In single-user mode, the kernel is not running
Q4) A file will be removed from the files system when the link count has become zero
Q5) When the Sun system is reset or first powered on, the screen blanks and a Sun logo is displayed along with some other information about the hardware on the console. At this point, the STOP-A key combination can be pressed to interact with the PROM code. A prompt of "ok" is offered.
Q6) RAID-0 is the referred to as "mirroring". Two (or more) partitions, all of the same size, each store an exact copy of all data, disk-block by disk-block. Mirroring gives strong protection against disk failure: if one disk fails, there is another with the an exact copy of the same data. Mirroring can also help improve performance in I/O-laden systems, as read requests can be divided up between several disks.
Q7) The super user (root) has user id 1 (one).
Q8) Using a -9 with the kill command, allows the process to trap the signal and run the signal handlers that may be associated with the process.
Q9) Only the super-user or an equivalent role can run nfsd
Q10) If field 7 of the password file is empty, csh (the C-Shell) will be used for that user account
Q11) In Solaris, the following command init 5 will reboot the system
In: Computer Science
ou are the Senior Systems Administrator for a community based charity. Your charity is involved in locating and providing accommodation, mental health services, training and support services to disadvantaged people in the community. Your charity currently runs a small datacentre that has some 50 x86 64 bit servers running mainly Windows Server 2008 R2 for desktop services, database and file services. It also has about 10 Red Hat Enterprise Linux 5 servers for public facing Web pages, services and support. Your charity is considering joining a community cloud provided by a public cloud vendor in order to provide a number of applications to all 500 support staff and administrative users. The community cloud would also be used to store the charity’s 200TB of data. This data contains a considerable amount of confidential information about the people to whom the charity provides services. A small number of the charity’s applications are mission critical and the data that those applications use is both confidential and time sensitive. The cloud vendor has made a presentation to management that indicates that operational costs will drop dramatically if the cloud model is adopted. You are asked to assess whether this model is in the best interests of the business. 1. Describe the steps that you would take to do a Risk Management assessment of this proposal. 2. Ramgovind, Eloff and Smith proposed in their 2010 paper that an information security analysis should include the requirements of Identification and authorisation, authorisation, confidentiality, Integrity, non-repudiation and availability. Discuss whether these requirements are adequate for a proper security assessment for a proposed move to an IaaS model for the charity. 3. A potential migration to the Cloud raises many issues around Governance. Discuss the governance issues that you see arising from a migration of on-premise servers to an IaaS model. 4. The charity’s board has proposed a move to migrate its servers to an IaaS model. Discuss the methods that you would propose to the board to assess the SLA of the Cloud Provider. 5. The board has decided, as an initial step, to move the office automation and database servers to the AWS cloud in order to begin the migration process, and test their strategy. Describe the steps that you would include in the plan to migrate these services.
looking for more specific answer for question 4 and 5
In: Computer Science
JAVA PROGRAM
Without changing changing main or PlayOneGame, you need to write the rest of the methods. Please complete "Rock, Scissor, Paper" game.
Main:
public static void main(String[] args )
{
int wins = 0;
int losses = 0;
PrintWelcomeMessage(); // Just says hello and explains the rules
while( PlayerWantsToPlay() ) // Asks the player if they want to play, and returns true or false
{
boolean outcome = PlayOneGame(); // One full game. We do NOT come back here on a tie. The game is not over on a tie.
if( outcome == true )
wins++;
else
losses++;
}
PrintGoodByeMessage( wins, losses ); // Prints the outcome of the games
}
Playonegame:
static boolean PlayOneGame()
{
int AI; int player; int outcome;
do
{
AI = AIPick(); // 0,1,2
player = PlayerPick() // 0,1,2
outcome = ComputeWinner(AI, Player)// 0,1,2
} while( outcome == 0 );// while tied
if( outcome == 1 )
return true; // they won
else
return false;// they lost
}In: Computer Science
Write a python programme in a Jupyter notebook which asks the user to input the number of radioactive nuclei in a sample, the number at a later time, and the elapsed time. The programme should calculate and display the decay constant and the half-life. The decay is described by the equations:
? = ? ?−?? ?0
?1/2 = ln (2)
.
Test your programme a sample that contains 4.00x108 nuclei initially and 1.57x107 nuclei after 150 seconds.
SO THEREFORE A PROGRAM THAT WILL ENABLE ME TO INPUT THE ABOVE VALUE TO TEST IT. THANKS
In: Computer Science
PYTHON Exercise 3. Phone Number and Email Address
Extractor
Say you have the boring task of finding every phone number and
email address in a long web page or document. If you manually
scroll through the page, you might end up searching for a long
time. But if you had a program that could search the text in your
clipboard for phone numbers and email addresses, you could simply
press ctrl-A to select all the text, press ctrl-C to copy it to the
clipboard, and then run your program. It could replace the text on
the clipboard with just the phone numbers and email addresses it
finds.
So, your phone and email address extractor will need to do the
following: - Get the text off the clipboard. - Find all phone
numbers and email addresses in the text. - Paste them onto the
clipboard.
In: Computer Science