Questions
BOVOU PWN <?php echo Hello World!; 77

BOVOU PWN <?php echo Hello World!; 77

In: Computer Science

(Java Programming Problem) Build two ArrayList lists from the Integer and String type arrays, populate the...

(Java Programming Problem)

Build two ArrayList lists from the Integer and String type arrays, populate the lists with repeats (see example below). Write a generic method (removeDuplicates( ….. )) to remove those duplicate items and returns an ArrayList<E> list without duplicates.

Original Integer List: [14, 24, 14, 42, 24, 25, 25, 23]

No-Duplicate List: [14, 24, 42, 25, 23]

Same generic method for the name list

Original List: [Mike, Lara, Jenny, Lara, Jared, Jonny, Lindsey, Mike, Jared]

No-Duplicate List: [Mike, Lara, Jenny, Jared, Jonny, Lindsey]

In: Computer Science

1. Write CREAT TABLE statements for the following tables (primary keys are underlined, foreign keys are...

1. Write CREAT TABLE statements for the following tables (primary keys are underlined, foreign keys are in italic and bold). Make sure you have all needed constraints and appropriate datatypes for attributes:

Student (stID, stName, dateOfBirth, advID, majorName, GPA)

Advisor (advID, advName, specialty)

2.  Insert several records in each table.

In: Computer Science

In Java, I need a program that will ask a user to input how many tests...

In Java, I need a program that will ask a user to input how many tests they want the average of. For example, It needs to ask the user how many tests would you like the average of? When the user enters the amount of tests they want the average score of, the program needs to give them that many test scores to input. Then with the average, determine what their grade is, if 90-100=A if 80-90 = B etc. Java and please explain.

In: Computer Science

Use C++ The ADT UnsortedType List function ‘DeleteItem(ItemType item)’ creates an endless loop error when trying...

Use C++

The ADT UnsortedType List function ‘DeleteItem(ItemType item)’ creates an endless loop error when trying to delete a word or key that is not in the list.

Example: Delete the word “letter” from the unsorted list.

Here are the lists contents before the DeleteItem(ItemType item) call:

super     formula travel     free        thick      Josephine            Clara      education

The question is ‘how can I exit gracefully from the DeleteItem(itemType Item) call when the word or key is not in the unsorted list and not get an endless loop but instead printing out a message that the word ‘letter’ is not in the loop? What code can be added?

void UnsortedType::DeleteItem(ItemType item)

{

NodeType* location;

NodeType* tempLocation;

location = listData;

if (item.ComparedTo(location->info) == EQUAL)

{

    tempLocation = location;

    listData = listData->next;

}

else

{

    while (!((item.ComparedTo((location->next)->info) == EQUAL)))

      location = location->next;

    tempLocation = location->next;

    location->next = (location->next)->next;

}

delete tempLocation;

length--;

}

In: Computer Science

Suppose A and B are regular language. Prove that AB is regular

Suppose A and B are regular language. Prove that AB is regular

In: Computer Science

1. Write CREAT TABLE statements for the following tables (primary keys are underlined, foreign keys are...

1. Write CREAT TABLE statements for the following tables (primary keys are underlined, foreign keys are in italic and bold). Make sure you have all needed constraints and appropriate datatypes for attributes: Student (stID, stName, dateOfBirth, advID, majorName, GPA) Advisor (advID, advName, specialty) 2. Insert several records in each table.

In: Computer Science

Convert the decimal floating point value 8.125 to a 12 bit binary floating point value. Use...

Convert the decimal floating point value 8.125 to a 12 bit binary floating point value. Use a sign bit, 3 bits (excess 3) for the exponent and an 8 bit significand. Enter just a 12 digit binary value ( e.g. 0 000 11110000 ) spaces ignored.

In: Computer Science

Discuss how companies use social media information to identify trends for products. Provide an example of...

Discuss how companies use social media information to identify trends for products. Provide an example of a software or analytics tool that is used to gather data. What legal or ethical issues does this type of information gathering present? Provide two examples and justify your ideas with specific reasons, facts, and examples.

In: Computer Science

x = 1:0.5:10 and a = 7.5, what does the following code do? (x > a)...

x = 1:0.5:10 and a = 7.5, what does the following code do?
(x > a) .* (x-5).^2
Explain it qualitatively and then provide the solution.

In: Computer Science

1. True or False? If one programmer in a large team is given the task of...

1. True or False? If one programmer in a large team is given the task of writing a single function for the team project, this programmer is more likely to need a function driver than a function stub.

2. A(n) ____________________ is a dummy function that is included for testing the higher-level code.

3. ____________________ is the principle that a module should perform exactly one abstract action.

4.

For the function definition
int SomeFunc( /* in */ int alpha,
/* in */ int beta )
{
int gamma;
alpha = alpha + beta;
gamma = 2 * alpha;
return gamma;
}
what is the function postcondition?

a. // Postcondition: gamma == 2*alpha

b. // Postcondition: alpha == alpha@entry + beta
// && gamma == 2*alpha

c. // Postcondition: Function value == gamma

d. // Postcondition: Function value == 2*alpha

e. // Postcondition: Function value == 2*(alpha@entry + beta)

5. ____________________ is a measure of the quantity of information passing through a module's interface.

6. In contrast to promotion, ____________________ of data values can potentially cause loss of information.

7.

Using the library functions available through the header file cctype, which of the following can be used to determine if the variable someChar contains either a digit character or a lowercase letter?

a. if (isalnum(someChar) || isdigit(someChar))

b. if (isalpha(someChar) || isdigit(someChar))

c. if (isalnum(someChar) && !isupper(someChar))

d. if (islower(someChar) || isdigit(someChar))

e. c and d above

8. True or False? For team programming to succeed, it is essential that all of the module interfaces be defined explicitly and the coded modules adhere strictly to the specifications for those interfaces.

9.

Which of the following could cause an unexpected side effect?

a. modifying a global variable

b. changing the value of a value parameter

c. referencing a global constant

d. declaring an incoming-only parameter to be a reference parameter

e. a and d above

10. True or False? Unsigned types are most appropriate for advanced techniques that manipulate individual bits within memory within memory cells to avoid errors caused by, for example, using unsigned variables for ordinary numeric computations.

In: Computer Science

Write a function which takes in X and Y arrays, a column number, and a threshold....

Write a function which takes in X and Y arrays, a column number, and a threshold. The function should return arrays X0 and Y0 containing all rows where the value in the specified column falls strictly below the threshold, as well as arrays X1 and Y1 containing all rows where the value in the specified column is above or equal to the threshold.(use numpy)

def split_on_feature(X_test, Y_test, column, thresh):
## TYPE ANSWER HERE

In: Computer Science

public class Square {    public static final int NUM_OF_SIDES = 4;    private float length;...

public class Square {
   public static final int NUM_OF_SIDES = 4;
   private float length;
  
   public Square(float l) {
       setLength(l);
   }
  
   public void setLength(float l) {
       if(l >= 0) {
           length = l;
       }
   }
  
   public float getLength() {
       return length;
   }
      
   //TODO - Add method to calculate add return area
  
  
   //TODO - Add method to calculate add return perimeter
  
   public String toString() {
       return String.format("Square [length: %f]", length);
   }
  
}

I am trying to add the formulas for area and perimeter but using the info provided each time I get a compile error indicating I am missing a main method. How would I go about adding these formulas without getting more compile errors?

In: Computer Science

Computer Science: Data Structures and Algorithms Practice: Construct a C++ program that takes two SQUARE matrices,...

Computer Science: Data Structures and Algorithms

Practice:

Construct a C++ program that takes two SQUARE matrices, and multiplies them and produces a new matrix:

Example:

[Matrix A] * [Matrix B] = [Matrix C]

(A 3x3 is the most preferred example to use)

(The first two matrices, A and B can be fixed numbers, hard-coded into the program. as opposed to user input)

Display Matrix C, also (cout etc.)

In: Computer Science

c++ code Reverse the order of elements in a vector of integers using two functions: (a)...

c++ code

Reverse the order of elements in a vector of integers using two functions:

(a) The first function takes the input vector a and return a vector b with the input data but in the reverse order, e.g. input: 1, 2, 3 and output 3, 2, 1.

(b) The second function is a recursive one and it reverses the input data in place (without using an additional vector).

In: Computer Science