A contiguous subsequence of a list S is a subsequence made up of consecutive elements of S. For example, if S is 5,15,-30,10,-5,40,10 then 5,15,-30 is a contiguous subsequence but 5,15,40 is not.
1. Give a linear-time algorithm for the following task:
Input: A list of numbers, A(1), . . . , A(n).
Output: The contiguous subsequence of maximum sum (a subsequence of length zero has sum zero).
For the preceding example, the answer would be 10,-5,40,10 with a sum of 55.

Answers

Answer 1

Answer:

We made use of the dynamic programming method to solve a linear-time algorithm which is given below in the explanation section.

Explanation:

Solution

(1) By making use of the  dynamic programming, we can solve the problem in linear time.

Now,

We consider a linear number of sub-problems, each of which can be solved using previously solved sub-problems in constant time, this giving a running time of O(n)

Let G[t] represent the sum of a maximum sum contiguous sub-sequence ending exactly at index t

Thus, given that:

G[t+1] = max{G[t] + A[t+1] ,A[t+1] } (for all   1<=t<= n-1)

Then,

G[0] = A[0].

Using the above recurrence relation, we can compute the sum of the optimal sub sequence for array A, which would just be the maximum over G[i] for 0 <= i<= n-1.

However, we are required to output the starting and ending indices of an optimal sub-sequence, we would use another array V where V[i] would store the starting index for a maximum sum contiguous sub sequence ending at index i.

Now the algorithm would be:

Create arrays G and V each of size n.

G[0] = A[0];

V[0] = 0;

max = G[0];

max_start = 0, max_end = 0;

For i going from 1 to n-1:

// We know that G[i] = max { G[i-1] + A[i], A[i] .

If ( G[i-1] > 0)

G[i] = G[i-1] + A[i];

V[i] = V[i-1];

Else

G[i] = A[i];

V[i] = i;

If ( G[i] > max)

max_start = V[i];

max_end = i;

max = G[i];

EndFor.

Output max_start and max_end.

The above algorithm takes O(n) time .


Related Questions

Write the method scrambleWord, which takes a given word and returns a string that contains a scrambled version of the word according to the following rules.
a. The scrambling process begins at the first letter of the word and continues from left to right.
b. If two consecutive letters consist of an "A" followed by a letter that is not an "A", then the two letters are swapped in the resulting string.
c. Once the letters in two adjacent positions have been swapped, neither of those two positions can be involved in a future swap.
The following table shows several examples of words and their scrambled versions.
word Result returned by scrambleWord(word)
"TAN" "TNA"
"ABRACADABRA" "BARCADABARA"
"WHOA" "WHOA"
"AARDVARK" "ARADVRAK"
"EGGS" "EGGS"
"A" "A"
"" ""

Answers

Answer:

Let's implement the program using JAVA code.

import java.util.*;

import java.util.ArrayList;

import java.io.*;

public class ScrambledStrings

{

/** Scrambles a given word.

* atparam word the word to be scrambled

* atreturn the scrambled word (possibly equal to word)

* Precondition: word is either an empty string or contains only uppercase letters.

* Postcondition: the string returned was created from word as follows:

* - the word was scrambled, beginning at the first letter and continuing from left to right

* - two consecutive letters consisting of "A" followed by a letter that was not "A" were swapped

* - letters were swapped at most once

*/

public static String scrambleWord(String word)

{

// iterating through each character

for(int i=0;i<word.length()-1;)

{

//if the condition matches

if(word.charAt(i)=='A' && word.charAt(i+1)!='A'){

//swapping the characters

word=word.substring(0,i)+word.charAt(i+1)+word.charAt(i)+word.substring(i+2);

//skipping the letter

i+=1;

}

//skipping the letter

i+=1;

}

return word;

}

Explanation:

Note: Please replace the "at" on the third and fourth line with at symbol that is shift 2.

You are responsible for managing Windows updates on 80 Windows 10 Enterprise computers at the office. You currently receive alert notifications when a new critical or security update is available for approval. Once you approve the updates, they are eventually installed. You would like these updates to apply automatically for the Windows 10 computers, and ensure that they are applied within 1 day of approval. How can this be accomplished with Intune

Answers

Answer:

Intune is a software that helps windows patching and upgrades. once the computer is connected to the internet/network. Intune will download updates to a particular computer that is targeted.

Explanation:

Solution

Intune is software that provides windows patching by discovering the PC’s connected to the network, pushing latest upgrades to the PC’s and detecting their current patch level.

Intune will make the updates download in the PC targeted when the PC’s are connected to the internet. Once they are downloaded it will wait until the PC gets restarted. If not it will give a popup that updates needs to be downloaded and will provide a timeline like two hours after which the PC by itself will auto restart.

All these can automatically be managed or done by the software. only it is required to be configured in a way that the PC’s should will be updated within 1 day, and Intune will use its algorithm to calculate the restart time and do the rest work on it's own.

Why would you not restore a Domain Controller that was last backed up twelve months ago

Answers

Answer:

All the data and information that was updated or added since then will be lost so it is useless to restore a Domain Controller that was backedup twelve months ago.

Explanation:

A domain conttoller back-up must be prepared on regular basis else if DC breaks, restoration of most recent database will be impossible.

Days of Each Month Design a program that displays the number of days in each month. The program’s output should be similar to this: January has 31 days. February has 28 days. March has 31 days. April has 30 days. May has 31 days. June has 30 days. July has 31 days. August has 31 days. September has 30 days. October has 31 days. November has 30 days. December has 31 days. Psuedocode

Answers

Answer:

A python script:

months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]

numbers = [31,28,31,30,31,30,31,31,30,31,30,31]

counter = 0

numbers_length=len(numbers)-1

while counter <= numbers_length:

month=months[counter]

number=numbers[counter]

print (month + " has " + str(number) + " days")

counter = counter+1

Explanation:

The Python script above will generate this output:

January has 31 days.

February has 28 days.

March has 31 days.

April has 30 days.

May has 31 days.

June has 30 days.

July has 31 days.

August has 31 days.

September has 30 days.

October has 31 days.

November has 30 days.

December has 31 days.


The data structure used for file directory is called
Select one
a. process table
b. mount table
C. hash table
d file table​

Answers

This is a tough question. I’m not sure if I’ll get it right but I’ll try.

Data structures used for file directories typically have a hierarchical tree structure, referred to as a directory structure. The tree has a root directory, and every file in that system has a unique path.

The simplest method of implementing a directory is to use a linear list of file names with pointers to the data blocks. But another way that you can format a file directory is by using a hash table. With this method, the linear list stores the directory entries, but a hash data structure is also used. The hash table takes a value computed from the file name and return the pointer to the file name any linear list.

So I think it’s C. But I’m not 100% sure.

I hope that helps.

Write a code for the following requirement.
The program must prompt for a name, and then tell the user how many letters are in the name, what the first letter of the name is, and what the last letter of the name is. It should then end with a goodbye message. A sample transcript of what your program should do is below - user input is in bold:
Enter your name: Jeremy
Hello Jeremy!
Your name is 6 letters long.
Your name starts with a J.
Your name ends with a y.
Goodbye!

Answers

Answer:

// This program is written in C++

// Comments are used for explanatory purposes

// Program starts here

#include<iostream>

using namespace std;

int main()

{

// Declare Variable name

string name;

// Prompt user for input

cout<<"Enter your name: ";

cin>>name;

// Print name

cout<<"Hello, "<<name<<"!\n";

// Print length of name

cout<<"Your name is "<<name.length()<<" letters long\n";

// Print first character

cout<<"Your name starts with a "<<name.at(0)<<"\n";

// Print last character

cout<<"Your name end with a "<<name.at(name.length()-1)<<"\n";

cout<<"Goodbye!";

return 0;

}

quick topic

if i make severs out of Ps4's, and Xbox'es which server would be more likly to crash ?

explain give an example

Answers

Answer: Xbox because ps4 has more people on it.

Explanation: for example if I had 2 computer and 1 computer it will be easier to make servers on the one computer

Which can be used to enter and manipulate information in a database?

ANSWER: C) a form

Answers

Answer:

a form

Explanation:

it says the answer already in the question

Write short notes on a. Transaction Processing System (TPS)

Answers

Answer: A Transaction Processing System (TPS) is a type of information system that collects, stores, modifies and retrieves the data transactions of an enterprise. Rather than allowing the user to run arbitrary programs as time-sharing, transaction processing allows only predefined, structured transactions.

Three cycles: Transaction processing systems generally go through a five-stage cycle of 1) Data entry activities 2) Transaction processing activities 3) File and database processing 4) Document and report generation 5) Inquiry processing activities.

Explanation: hope this helps!

In this project, you’ll create a security infrastructure design document for a fictional organization. The security services and tools you describe in the document must be able to meet the needs of the organization. As the security consultant, the company needs you to add security measures to the following systems:
a. An external website permitting users to browse and purchase widgets
b. An internal intranet website for employees to use
c. Secure remote access for engineering employees
d. Reasonable, basic firewall rules
e. Wireless coverage in the office
f. Reasonably secure configurations for laptops
Since this is a retail company that will be handling customer payment data, the organization would like to be extra cautious about privacy. They don't want customer information falling into the hands of an attacker due to malware infections or lost devices. Engineers will require access to internal websites, along with remote, command line access to their workstations.

Answers

Answer:

Explanation:

It is very important for the organisation to implement maximum security to the infrastructure. The main data totally belongs to the customers which mainly has customers' personal information and bank details. So, here are few things that needs to be look at as a security expert:

Encryption: the implementation of encryption tool to encrypt the data especially passwords and card details of the customer will be help in securing the infrastructure. Encryption makes it hard for anyone to be able decrypt the actual data.

Firewall: This is the beginning stage of implementing security to an infrastructure. Firewall will help greatly in blocking traffic that are unwanted from entering into the infrastructure. This also blocks untrusted traffic to the application server too.

SSL certificate: Implementation of SSL certificate to the website or the application will help greatly in securing and protecting the application for you against online hackers.

Every device belongs to your system must be implemented with anti-malware softwares that can able to detect malware present in the system.

Highlights the possible risks and problems that should be addressed during the implementation process

Answers

Answer:

The answer is below

Explanation:

Since the type of Implementation is not stated specifically, it is believed that, the question is talking about ERP Implementation, because it is related to subject in which the question is asked.

Hence, Enterprise Resource Planning (ERP) implementation deals basically, by carrying out installation of the software, transferring of finanancial data over to the new system, configuring application users and processes, and training users on the software

ERP Implementation Risks involve the following:

1. Inefficient Management and Project Activities.

2. Inadequate or No Training and Retraining of Customers or End-Users.

3. Inability to Redesign Business Processes to meet the Software requirements.

3. Incompetent or lack of Technical Support Team and Infrastructure.

4. Incapability to Obtain Full-Time Commitment of Employee.

5. Failure to Recruit and Maintained Qualified Systems, and Developers.

What are examples of common computer software problems? Check all that apply
Pages with fading ink come out of a printer.
Programs suddenly quit or stop working.
O Documents close without warning.
O A video file stops playing unexpectedly.
A program updates to the latest version.
A computer crashes and stops working.

Answers

Answer:

its A C E

Explanation:

what is the percentage of 20?

Answers

Hi!

I'm Happy to help you today!

The answer to this would be 20%!

The reason why is because percents are simple to make! Like theres always an end percent! But its always gonna end at 100% Let me show you some examples to help you understand!

So were gonna have the end percent at 100%

Lets turn 2 into a percent!

2 = 2% because its under 100%

Now lets go into a Higher number like 1000%

So lets turn 33 into a percent!

33 = 3.3% 30 turns into 3% because of the max percent of 1000% and then 3 turns into .3% because of the max of 1000%

I hope this helps!

-LimitedLegxnd

-If you enjoyed my answer make sure to hit that Heart! Also Rate me to show others how well i did! You can do that by clicking the stars!

-Question asker mark me brainliest if you really enjoyed my answer!

what is the basic similarities and difference between the three project life cycles model? ​

Answers

Answer:

Project life cycle is the time taken to complete a project, from start to finish.

The three project life cycles model include the following:

PredictiveIterative and IncrementalAdaptive

Explanation:

Predictive project life cycles model: In this stage, the three major constraints of the project which are the scope, time and cost are analyzed ahead of time and this analysis is well detailed and the detailed scope of the project is done right from the start of the project.

Iterative and Incremental life cycles model: In this iterative and incremental model, the project is again split into stages that can be sequential or overlapping and at the first iteration of the project, the scope is determined ahead of time.

Adaptive life cycles model: Also in this stage, the project is split up into phases but because these phases are more rapid and ever changing unlike the other models, the processes within the scope can work in parallel.

Similarities

They make use of high level planning.They are sequential and overlapping.They make use of high level scope.

Differences

The predictive life cycle model makes use of a detailed scope at the beginning of a project while the other models make use of detailed scope only for each phase.In predictive life cycle model, the product is well understood, in other models, the projects are complex and not easily understood.There is periodic customer involvement in predictive and interative life cycle model while the customer involvement in the adaptive model, the customer model is continuous.

Answer:

similarities :  They all are brought in to the world somehow.

They all have difreant stages to become an adult.

Difreances: They have difreant number of stages till they become an adult.

they all have difreant lypes of growing their bodies do.

Explanation:

If many programs are kept in main memory, then there is almostalways another program ready to run on the CPU when a page faultoccurs. Thus, CPU utilization is kept high. If, however, we allocate alarge amount of physical memory to just a few of the programs, theneach program produces a smaller number of page faults. Thus, CPUutilization is kept high among the programs in memory. What would the working set algorithm try to accomplish, and why?(Hint: These two cases represent extremes that could lead toproblematic behavior.)

Answers

Answer:

With the analysis of the case, we can infer that regarding the model or algorithm of the work set, we want to reduce page faults in each individual process, guaranteeing that the set of pages are included before executing the process.

There are things that should not change, such as the set of pages used in the process or the working set as they are called, they could only change if a program moves to a different phase of execution. In this way the most suitable and profitable approach is proposed for the use of time in the processor, by avoiding bringing oagines from the hard disk and instead of this the process is executed, because otherwise it would take a long time what was observed in decreased performance.

Regarding what was mentioned in the question, it follows that 2 extremes lead to a problematic behavior, to define the first as a page fault and the second refers to a small number of processes executed.

how does making a phone differ when using public phone box and cell phone

Answers

Answer:

The public phone box transmit electronic signals through cable while cell phones transmit electromagnetic signals wirelessly.

Explanation:

Public phone boxes are reserved booth for making calls. It uses dial tone frequency to tap to a receiver's frequency. They use a dedicated cable line to transmit electronic signals to a central automatic switch that relays the signal to the recipient's line.

A cell phone has antennas that transmits the electromagnetic wave signal to a cell tower, which in turn transmit to other towers to locate the receiver. The receiver's antenna receives the signal and connection is made.

A basketball game has four quarters. Write a program to do the following. Use a for loop to input scores of team A and team B in each of the four quarters. Every time a score is entered, update and display the current total score of that team. After all four quarters, compare the total scores of the two teams and display the outcome of the game (“Team A has won”, “Team B has won” or “It is a tie”)

Enter team A score in this quarter: 22
Team A score so far: 22
Enter team B score in this quarter: 24
Team B score so far: 24
Enter team A score in this quarter: 19
Team A score so far: 41
Enter team B score in this quarter: 26
Team B score so far: 50
Enter team A score in this quarter: 25
Team A score so far: 66
Enter team B score in this quarter: 22
Team B score so far: 72
Enter team A score in this quarter: 21
Team A score so far: 87
Enter team B score in this quarter: 20
Team B score so far: 92
Team B has won

Enter team A score in this quarter: 22
Team A score so far: 22
Enter team B score in this quarter: 20
Team B score so far: 20
Enter team A score in this quarter: 26
Team A score so far: 48
Enter team B score in this quarter: 21
Team B score so far: 41
Enter team A score in this quarter: 19
Team A score so far: 67
Enter team B score in this quarter: 28
Team B score so far: 69
Enter team A score in this quarter: 25
Team A score so far: 92
Enter team B score in this quarter: 23
Team B score so far: 92
It is a tie


Answers

Answer:

The program in cpp for the given scenario is shown.

#include <iostream>

using namespace std;

int main()

{

   //variables declared to hold individual and total scores

   int score_a=0, a;

   int score_b=0, b;

   //user input taken for score

   for(int i=0; i<4; i++)

   {

       std::cout << "Enter team A score in quarter " <<(i+1)<<" : ";

       cin>>a;

       score_a = score_a+a;

       std::cout << "Team A score so far: "<< score_a <<std::endl;

       std::cout << "Enter team B score in quarter " <<(i+1)<<" : ";

       cin>>b;

       score_b = score_b+b;

       std::cout << "Team B score so far: "<< score_b <<std::endl;

   }

   //winner team decided by comparing scores

   if(score_a>score_b)

       std::cout << "Team A has won" << std::endl;

   if(score_a==score_b)

       std::cout << "It is a tie." << std::endl;

   if(score_a<score_b)

       std::cout << "Team B has won" << std::endl;

   //program ends

   return 0;

}

Explanation:

1. The integer variables are declared to hold both individual scores and the total score for both the teams.

   int score_a=0, a;

   int score_b=0, b;

2. The variables to hold total scores are initialized to 0.

3. Inside for loop, scores for both teams for all 4 quarters are taken from the user.

4. Inside the same for loop, a running total for the score of each team is computed and displayed.

score_a = score_a+a;

score_b = score_b+b;

5. Outside the loop, the total scores of both the teams are compared and the winner team is displayed. This is done using multiple if statements.

if(score_a>score_b)

       std::cout << "Team A has won" << std::endl;

   if(score_a==score_b)

       std::cout << "It is a tie." << std::endl;

   if(score_a<score_b)

       std::cout << "Team B has won" << std::endl;

6. After each message is displayed, a new line is inserted at the end using keyword, endl.

7. The program ends with a return statement.

8. The whole code is written inside main(). In cpp, it is not mandatory to write the code inside a class since cpp is not a purely object-oriented language.

9. The output is attached in an image.

Write a function with this prototype:
#include
void numbers(ostream& outs, const string& prefix, unsigned int levels);
The function prints output to the ostream outs. The output consists of the String prefix followed by "section numbers" of the form 1.1., 1.2., 1.3., and so on. The levels argument determines how many levels the section numbers have. For example, if levels is 2, then the section numbers have the form x.y. If levels is 3, then section numbers have the form x.y.z. The digits permitted in each level are always '1' through '9'. As an example, if prefix is the string "THERBLIG" and levels is 2, then the function would start by printing:
THERBLIG1.1.THERBLIG1.2.THERBLIG1.3.and ends by printing:THERBLIG9.7.THERBLIG9.8.THERBLIG9.9.The stopping case occurs when levels reaches zero (in which case the prefix is printed once by itself followed by nothing else).The string class from has many manipulation functions, but you'll need only the ability to make a new string which consists of prefix followed by another character (such as '1') and a period ('.'). If s is the string that you want to create and c is the digit character (such as '1'), then the following statement will correctly form s:s = (prefix + c) + '.';This new string s can be passed as a parameter to recursive calls of the function.

Answers

Answer:

Following are the code to this question:

#include <iostream> //defining header file  

using namespace std;

void numbers(ostream &outs, const string& prefix, unsigned int levels); // method declaration

void numbers(ostream &outs, const string& prefix, unsigned int levels) //defining method number

{

string s; //defining string variable

if(levels == 0) //defining condition statement that check levels value is equal to 0

{

outs << prefix << endl;  //use value

}

else //define else part

{

for(char c = '1'; c <= '9'; c++) //define loop that calls numbers method

{

s = prefix + c + '.'; // holding value in s variable  

numbers(outs, s, levels-1); //call method numbers

}

}

}

int main() //defining main method

{

numbers(cout, "THERBLIG", 2); //call method numbers method that accepts value

return 0;

}

Output:

please find the attachment.

Explanation:

Program description:

In the given program, a method number is declared, that accepts three arguments in its parameter that are "outs, prefix, levels", and all the variable uses the address operator to hold its value. Inside the method a conditional statement is used in which string variable s and a conditional statement is used, in if the block it checks level variable value is equal to 0. if it is false it will go to else block that uses the loop to call method. In the main method we call the number method and pass the value in its parameter.  

Stephi owns a footwear store She wants to create a graph of the number of sneakers sold, brandShe copies the Sneaker Sales query results from the database What should be her next step?

ANSWER: A) pasting the query results into a spreadsheet

Answers

If Stephi owns a footwear store and she wants to create a graph of the number of sneakers sold, and she copies the Sneaker Sales query results from the database, her next step will be: pasting the query results into a spreadsheet.

How to create the graph

Spreadsheets are known for their automatic graph-producing features. This means that if you have a result from a table that is obtained from a query, you can plot the result in any kind of graph if the table is transferred to a spreadsheet.

So, for Stephi to plot the graph, she should copy and paste the result into a spreadsheet.

Learn more about spreadsheets here:

https://brainly.com/question/4965119

#SPJ4

Write a Java code for the following requirement.
File encryption is the science of writing the contents of a file in a secret code.
The encryption program should work like a filter, reading the contents of one file, modifying the data into code, and then writing the code contents out to a second file. The second file will be a version of the first file, but written in a secret code.
Although there are complex encryption techniques, you should come up with a simple one of your own. For example, you could read the first file one character at a time and add 10 to the character code of each character before it is written to the second file.

Answers

Answer:

import java.io.File;

import java.io.FileInputStream;

import java.io.FileNotFoundException;

import java.io.FileOutputStream;

import java.io.IOException;

import java.util.Scanner;

public class EncryptFileData

{

public static void main(String args[]) throws IOException, FileNotFoundException

{

String inputFileName="input.txt";

String outputFileName="EncryptedFile.txt";

String decryptFileName="DecryptedFile.txt";

byte codeValue;

Scanner sc=new Scanner(System.in);

//Accept code value from user

System.out.println("Enter the value of code");

codeValue=sc.nextByte();

//Encrypt the input file

encryptFileContent(inputFileName, codeValue,outputFileName);

//Decrypt the input file

decryptFileContent(outputFileName, codeValue,decryptFileName);

}

//function to encrypt the input file

private static void encryptFileContent(String inputFileName,

byte encodeValue, String outputFileName) throws IOException, FileNotFoundException{

File file = new File(inputFileName);

FileInputStream fin = new FileInputStream(file);

FileOutputStream fout = new FileOutputStream(outputFileName);

try{

while(fin.available() != 0){

int inData = fin.read();

//For every character in input add code value and

//write result to file "EncryptedFile.txt"

fout.write(inData+encodeValue);

}

}finally{

fin.close();

fout.close();

}

}

//function to decrypt the encrypted file

private static void decryptFileContent(String inputFileName,

byte encodeValue, String outputFileName) throws IOException, FileNotFoundException{

File file = new File(inputFileName);

FileInputStream fin = new FileInputStream(file);

FileOutputStream fout = new FileOutputStream(outputFileName);

try{

while(fin.available() != 0){

int inData = fin.read();

//For every character in encrypted file

//subtract the code value from each character and

//write it to file "DecryptedFile.txt"

fout.write(inData-encodeValue);

}

}finally{

fin.close();

fout.close();

}

}

}

Explanation:

Given the following conditions to follow in the question;

=> "The encryption program should work like a filter, reading the contents of one file, modifying the data into code, and then writing the code contents out to a second file. "

=> "The second file will be a version of the first file, but written in a secret code."

Thus, the Java code is given below(one can just copy and run it to give a sample output of: Enter the value of code 1 2.

The Java code is;

import java.io.File;

import java.io.FileInputStream;

import java.io.FileNotFoundException;

import java.io.FileOutputStream;

import java.io.IOException;

import java.util.Scanner;

public class EncryptFileData

{

public static void main(String args[]) throws IOException, FileNotFoundException

{

String inputFileName="input.txt";

String outputFileName="EncryptedFile.txt";

String decryptFileName="DecryptedFile.txt";

byte codeValue;

Scanner sc=new Scanner(System.in);

//Accept code value from user

System.out.println("Enter the value of code");

codeValue=sc.nextByte();

//Encrypt the input file

encryptFileContent(inputFileName, codeValue,outputFileName);

//Decrypt the input file

decryptFileContent(outputFileName, codeValue,decryptFileName);

}

//function to encrypt the input file

private static void encryptFileContent(String inputFileName,

byte encodeValue, String outputFileName) throws IOException, FileNotFoundException{

File file = new File(inputFileName);

FileInputStream fin = new FileInputStream(file);

FileOutputStream fout = new FileOutputStream(outputFileName);

try{

while(fin.available() != 0){

int inData = fin.read();

//For every character in input add code value and

//write result to file "EncryptedFile.txt"

fout.write(inData+encodeValue);

}

}finally{

fin.close();

fout.close();

}

}

//function to decrypt the encrypted file

private static void decryptFileContent(String inputFileName,

byte encodeValue, String outputFileName) throws IOException, FileNotFoundException{

File file = new File(inputFileName);

FileInputStream fin = new FileInputStream(file);

FileOutputStream fout = new FileOutputStream(outputFileName);

try{

while(fin.available() != 0){

int inData = fin.read();

//For every character in encrypted file

//subtract the code value from each character and

//write it to file "DecryptedFile.txt"

fout.write(inData-encodeValue);

}

}finally{

fin.close();

fout.close();

}

}

}

A company wants to implement a wireless network with the following requirements:
i. All wireless users will have a unique credential.
ii. User certificate will not be required for authentication
iii. The company's AAA infrastructure must be utilized
iv. Local hosts should not store authentication tokesn
1. Which of the following should be used in the design to meet the requirements?
O EAP-TLS
O WPS
O PSK
O PEAP

Answers

Answer:

PEAP is the correct answer to the given question .

Explanation:

The  PEAP are implemented to meet the demands because it is very much identical to the EAP-TTLS design also it includes the server-side PKI authentication .

The main objective of  PEAP is to establish the protected TLS tunnel for protecting the authentication process, as well as a server-side encryption authentication.The PEAP  is also used for validating the application it validating her process with the help of the TLS Tunnel encryption between the user and the verification.All the other options are not suitable for the  to meet the requirements of the design that's why these are incorrect option .

It’s pretty much impossible to have a bug-free game upon initial release for anything but the simplest game.
True
False

Answers

Answer:

True

Explanation:

There are usually thousands of line of code and the programmers have to account for serveral different things. For that reason, most complex games will have at least some bugs.

Write a script that declares and sets a variable that’s equal to the total outstanding balance due. If that balance due is greater than $10,000.00, the script should return a result set consisting of VendorName, InvoiceNumber, InvoiceDueDate, and Balance for each invoice with a balance due, sorted with the oldest due date first. If the total outstanding balance due is less than $10,000.00, return the message "Balance due is less than $10,000.00."

Answers

Answer:

see explaination

Explanation:

SCRIPT :

drop table Vendor;

create table Vendor (VendorName varchar2(20), InvoiceNumber number (20), InvoiceDueDate date, Balance number(32,6));

insert into VENDOR (VENDORNAME,INVOICENUMBER,INVOICEDUEDATE,BALANCE) values ('ABC',121,TO_TIMESTAMP('01-01-18','DD-MM-RR HH12:MI:SSXFF AM'),1000);

Insert into Vendor (VENDORNAME,INVOICENUMBER,INVOICEDUEDATE,BALANCE) values ('XYZ',1212121,to_timestamp('02-01-18','DD-MM-RR HH12:MI:SSXFF AM'),100000);

declare

cursor c1 is select * from Vendor;

begin

for i in c1

loop

if I.BALANCE < 1001 then

DBMS_OUTPUT.PUT_LINE('Vendor Name '||I.VENDORNAME||', Invoice Number '||I.INVOICENUMBER||', Invoice DueDate '||I.INVOICEDUEDATE||',BALANCE '||I. BALANCE);

else

dbms_output.put_line('Vendor Name '||i.VendorName||', Invoice Number '||i.InvoiceNumber||', Invoice DueDate '|| i.InvoiceDueDate||' Balance due is less than $1000');

end if;

end LOOP;

end;

output : SCRIPT OUTPUT

table VENDOR dropped.

table VENDOR created.

1 rows inserted.

1 rows inserted.

anonymous block completed

dbms output :

Vendor Name ABC, Invoice Number 121, Invoice DueDate 01-JAN-18,BALANCE 1000

Vendor Name XYZ, Invoice Number 1212121, Invoice DueDate 02-JAN-18 Balance due is less than $1000

Which of the following groups is NOT located on the Home tab?

Answers

Which of the following groups is NOT located on the Home tab?

Animations

Animations is not located

What must be done to translate a posttest loop expressed in the form


repeat:


(. . . )


until (. . . )


into an equivalent posttest loop expressed in the form


do:


(. . . )


while (. . . )

Answers

Answer:

num = 0

while (num < 50):

if (num is Odd)

print(num is Odd)

num = num + 1

num = 0

repeat:

if (num is Odd)

print(num is Odd)

num = num + 1

until (num>=50)

A vice president at Alexander Rocco Corporation says he received a hostile e-mail message from an employee in the Maui office. Human Resources has informed him that the message contents are grounds for termination, but the vice president wonders whether the employee actually sent the message. When confronted, the employee claims he didn't send the message and doesn’t understand why the message shows his return address.

Required:
Write a memo to the vice president, outlining the steps an employee might have taken to create an e-mail message and make it appear to come from another employee’s account. Be sure to include some SMTP commands the culprit might have used.

Answers

Answer:

=> E-mail is sent using SMTP server by using command such as;

telnet smpt.server.name 25.

(Where 25 = port and telnet smpt.server.name = name of the server).

Explanation:

Date: June 2, 2020.

To: The vice president.

From: Codedmog101

SUBJECT: E-mail Forging.

Due to the recent issue going on in the company concerning an employee sending a message to you, I saddled with the responsibility of writting to you the steps an employee might have taken to create an e-mail message and make it appear to come from another employee’s account.

(1). The SMTP servers can be configured in such a way that it can be used by spammers to send message to another person(recipient) and it will look like it is not the spammer that sent it.

(2). The person spamming another person will use an unsecured SMTP servers with command such as the one given below;

telnet smpt.server.name 25.

(3). Once (2) has been connected, the spammer can then input the e-mail of the person he or she is spamming.

(4). The recipient address will be type in by the spammer too

(5). The subject, date and the body then enter.

(5). After (5) above the message will be sent to the recipient from the spammer but it will indicate another person.

These are the steps taken to create an e-mail message and make it appear to come from another employee’s account.

Best regards,

Codedmog101

As citizens online or in real life, how, or why, do the choices we make, almost always seems to have an effect (positive or negative) on others?

Answers

Answer:

The choices we make as citizens online or in real life have both positive and negative effects on others because we are social beings, who live in an interconnected world.  Every choice has some consequences on the decision maker or on others.  We make the choices, but the consequences follow natural laws, which we cannot control.  When Adam and Eve chose to disobey God, human beings down the ages lost their innocence and freedom.  When the Nazis chose to purify their race of European Jews, there was the Holocaust between 1941 and 1945.  When the Minneapolis police officer chose to slaughter George Floyd in cold blood, violent protests erupted throughout the U.S.

Another current example to buttress this is the ravaging coronavirus pandemic, which originated in Wuhan - China.  When the Chinese Communist  government chose to suppress the information about the virus as it usually does, the aftermath is the thousands of dead humans all over the world, the economic downturn, loss of jobs, virus infections with other public health side effects, plus many other untold consequences.

Had the Chinese government made a different choice, the virus could not have spread worldwide as it had.  Similarly, some citizens online choose to circulate unverifiable ("fake news") information.  Many people have been misled by their antics, some have lost their lives, while many others live in perpetual bigotry and hatred.  All these are because of individual choices.

Explanation:

Choice is a concept in decision making.  It is the judging of the merits of multiple options so that one or some of the options are selected.  When a voter votes for one candidate against others, she has made a choice (decision).  Of course, choices have consequences, which we must live with.  Choices also define our present and our future.

A manager does not know how to program code. What could he use communicate his programming ideas effectively to his team?

ANSWER: B) pseudocode

Answers

Answer:

pseudocode

Explanation:

it says the answer in the question

Answer:

B:  pseudocode

Explanation:

2 point) Express this problem formally with input and output conditions.2.(2 points) Describe a simple algorithm to compute the upper median. How manyoperations does it take asymptotically in the worst case?3.(7 points) Show how you can use the (upper) medians of the two lists to reduce thisproblem to its subproblems. State a precise self-reduction for your problem.4. (7 points) State a recursive algorithm that solves the problem based on your reduction.5.(2 point) State a tight asymptotic bound on the number of operations used by youralgorithm in the worst case.

Answers

Answer:

See attached images

Modify the selectionSort function presented in this chapter so it sorts an array of strings instead of an array of ints. Test the function with a driver program. Use program 8-8 as a skeleton to complete.

Program 8-8

#include

#include

using namespace std;

int main()

{

const int NUM_NAMES = 20

string names [NUM_NAMES] = {"Collins, Bill", "Smith, Bart", "Allen, Jim", "Griffin, Jim", "Stamey, Marty", "Rose,Geri", "Taylor, Terri", "Johnson, Jill", "Allison, Jeff", "Looney, Joe", "Wolfe, Bill", "James, Jean", "Weaver, Jim", "Pore, Bob", "Rutherford, Greg", "Javens, Renee", "Harrison, Rose", "Setzer, Cathy", "Pike, Gordon", "Holland, Beth" };

//Insert your code to complete this program

return 0;

}

Answers

Answer:

Following are the method to this question:

void selectionSort(string strArr[], int s) //defining selectionSort method

{

int i,ind; //defining integer variables

string val; //defining string variable

for (i= 0; i< (s-1);i++) //defining loop to count value

  {

      ind = i; //assign loop value in ind variable

      val = strArr[i]; // strore array value in string val variable

      for (int j = i+1;j< s;j++) // defining loop to compare value

      {

          if (strArr[j].compare(val) < 0) //using if block to check value

          {

              val = strArr[j]; //store value in val variable  

              ind= j; //change index value

          }

      }

      strArr[ind] = strArr[i]; //assign string value in strArray  

      strArr[i] = val; // assign array index value

  }

}

void print(string strArr[], int s) //defining print method

{

  for (int i=0;i<s;i++) //using loop to print array values

  {

      cout << strArr[i] << endl; //print values

  }

  cout << endl;

}

Explanation:

In the above-given code, two methods "selectionsort and print" is declared, in which, both method stores two variable in its parameter, which can be described as follows:

Insides the selectionSort method, two integer variable "i and ind" and a string variable "val" is defined, inside the method a loop is declared, that uses the if block condition to sort the array. In the next line, another method print is declared that declared the loop to prints its value. Please find the attachment for full code.
Other Questions
Politicians who supported the ratification of the Constitution were known as Federalists. Why were the Federalists in favor of the Constitution? A. They wanted the states to have a great deal of power. B. They wanted a strong central government. C. They wanted the U.S. to go back to being a British colony. D. They wanted to establish a monarchy. Is the square root of 2 rational or irrational? Between which two integers is between -140 5) Who were the Tuskegee Airmen?A) A group of African-American airplane mechanicsB) A group of African-American cooksC) The first group of African-American pilots in the U.S. MilitaryD) All of the above What is a benefit to how French civil code settles disputes? A. It is transparent because laws and punishments are established.B. It encourages citizens to take their disputes to court. C. It gives judges more influence and power over laws.D. It allows for greater opportunities for citizens to appeal decisions. 1) The quotient of two numbers is 4, and their difference is 3. What are the two numbers? Someone help please this subject is difficult for me. What country entering the NATO alliance sparked the creation of the Warsaw Pact How many 2-letter combinations can be created from the distinct letters in the word "mathematician"? Assume that theorder of the letters does not matter.285678156 Which of the following are correct names for the line? SELECT ALL THAT APPLY.A. CAB. ACC. ABD. CB Ms.Nichols recorded the amount of time, in minutes, that she exercised during the first ten days of the month. 30,45,25,25,35,5,40,35,40,20. What is the mean of the data set? Based on the following selected data, journalize the adjusting entries as of December 31 of the current year. For a compound transaction, if an amount box does not require an entry, leave it blank. If no entry is required, select "No entry required" and leave the amount boxes blank. a. Estimated uncollectible accounts at December 31, $16,000, based on an aging of accounts receivable. The balance of Allowance for Doubtful Accounts at December 31 was $2,000 (debit).b. The physical inventory on December 31 indicated an inventory shrinkage of $3,300.c. Prepaid insurance expired during the year, $22,820.d. Office supplies used during the year, $3,920.e. A patent costing $48,000 when acquired on January 2 has a remaining legal life of 10 years and is expected to have value for 8 years.f. The cost of mineral rights was $546,000. Of the estimated deposit of 910,000 tons of ore, 50,000 tons were mined and sold during the year.g. Vacation pay expense for December, $10,500.h. Interest was accrued on the $100,000, 9% note receivable received on October 17. Assume 360 days per year. Which of these was NOT a reasonthe United States initiated theattack on the Philippines?A. Atrocities were committed toward the peopleof the PhilippinesB. Spain owned it.C. The bulk of the Spanish fleet was docked inManila Bay.D. The U.S. was interested in the territory of thePhilippines2003 y to the power of 3=64 Liana can see that the measure of Angle L and Angle M form a straight line. Since Liana knows that a straight line has an angle measure of 180 degrees, what is the measure (in degrees) of Angle M? 10 Baking soda (NaHCO3) decomposes when it is heated according to the equation below. How many kilojoules of heat are required to decompose 1.95molNaHCO3(s)?2NaHCO3(s) + 1290 - Na2CO3(s) + H20(9) + CO2(9)126 13258129 la 2.53 x 107 Should cities located in or near deserts build solar and wind farms? Why or why not? Cite evidence from the text to support your answer. Layla was able to map circle MMM onto circle NNN using a translation and a dilation. Layla concluded: "I was able to map circle MMM onto circle NNN using a sequence of rigid transformations, so the figures are congruent." What error did Layla make in her conclusion? Choose 1 answer: Choose 1 answer: (Choice A) A Layla didn't use only rigid transformations, so the figures are not congruent. (Choice B) B It's possible to map circle MMM onto circle NNN using a sequence of rigid transformations, but the figures are not congruent. (Choice C) C There is no error. This is a correct conclusion. What is the range of the number of points scored? A 66 B 9 C 75 D 13The numbers are75, 64, 63, 68, 62, and 71,Please Can someone answer this question please please help me I really need it if its correct I will mark you brainliest .