Java coding:
2. Write a method which takes a list list of int , and reverse it. // recursion
3.Write a method which takes a list list of strings , and reverse it. // in different way than the previous
3. Write a two methods which take a list and find the largest integer number in it.
In: Computer Science
I need to create a web page(JAVASCRIPT) that allows the user to reverse a string. For Example, if the user types Mirror Image, after the button is clicked, the text will say egamI rorriM.You have to implement each button by using a while, do while and for loop.
here is a default code
<html>
<head>
<title>Mirror</title>
</head>
<body>
<p id="label1">Original Text: <h1
id="text1">Some text goes here!!!</h1></p>
<p id="label2">Mirror Text: <h1
id="text2">!!!ereh seog txet emoS</h1>
<input type="button" value="Reverse (while loop)"
/><br />
<input type="button" value="Reverse (do while
loop)" /><br />
<input type="button" value="Reverse (for loop)"
/><br />
</body>
</html>
In: Computer Science
1) Select the true statement regarding the establishment of successful communications.
|
a. transmission power must only be sufficient to overcome signal attenuation since noise cannot be eliminated |
||
|
b. it is critical to know the signal-to-noise ratio (SNR) at the receiver, i.e., SNR at the transmitter is not as important |
||
|
c. when determining the capacity of a communications link it is not important to understand the link characteristics of the medium (guided or unguided) in which the signal will propagate |
||
|
d. the capacity of a transmission link is not dependent upon signal frequency bandwidth |
2)
The Shannon-Hartley Theoretical Capacity formula tells you the maximum data rate capacity achievable. By using modern M’ary modulation techniques you can easily reach higher data rate capacities.
a) True
b) False
3)
What is needs to be considered to ensure successful communications over guided or unguided mediums?
|
a. determining the EM noise environment in which communications will take place |
||
|
b. understanding the frequency and frequency bandwidth limitations associated with the assigned communication frequencies |
||
|
c. matching modulation or line coding methods to the characteristics of communications being established |
||
|
d. all of the above must be considered |
4)
Select the correct statement(s) regarding SMF and MMF fiber optic cables.
|
a. multimode fiber (MMF) has a wider core diameter that supports multiple modes of light; as such, MMF can support higher data capacities compared to single-mode fiber (SMF) |
||
|
b. MMF suffers from modal delay, which results in digital signal distortion |
||
|
c. SMF cables are constructed with a small optical core, which means its data capacity is much less than MMF fiber which have a larger diameter core |
||
|
d. all are correct statements |
In: Computer Science
Exercises: Home Work to do :
1) write BNF grammars for the following sententials: lexemes (not tokens)
- positive and negative integer numbers
- floating point numbers
- variable names in C
------------------------------------
2) check (recognize) if this code can derive from the given grammar ?
- swith (tatal)
{
case total > 1000 : cout<<"expensive"; break;
case total = 1000 : cout<<"exact"; break;
case total < 1000 : cout<<"cheap"; break;
}In: Computer Science
Discussion: How Mobile Phones Power Disaster Relief
Watch the following video, and Provide a critique. Also, think of other possible scenarios where mobile technology can be used to address humanitarian efforts.
https://youtu.be/L9_c1j9VRwE
In: Computer Science
Q. A sequence X1, X2, ... , Xn is said to be cyclically sorted if the smallest number in the sequence is Xi for some unknown ?, and the sequence Xi, Xi+1, Xn, ... , X1, X2,....Xi-1 is sorted in an increasing order. Design an algorithm to find the position of the minimal element in a cyclically sorted ? distinct elements. (6 points) If your algorithm uses recursion, you need so show the recurrence function. Otherwise, show a closed-end form of the running time function. (2 points) Show that your algorithm in ?(log ?) time. (2 points) (No need to prove the bound).
In: Computer Science
Q3. Answer with yes or no and give a reason.
1-Is DES vulnerable to a brute-force attack?
2-Is 3DES vulnerable to a brute-force attack?
3- Is AES vulnerable to a brute-force attack?
In: Computer Science
What are some of the control processes that can be used to support innovation?
2. In a minimum of 250 words answer the following questions.
What are some of the reasons a company many consider a merger or acquisition?
In: Computer Science
Please read through the lecture notes on Wicket problem
Wicked Problems: Characteristics
Conklin offered a set of six defining characteristics:
1. You don’t understand the problem until you have developed a solution.
2. Wicked problems have no stopping rule.
3. Solutions to wicked problems are not right or wrong.
4. Every wicked problem is essentially unique and novel.
5. Every solution to a wicked problem is a ‘one shot operation.’
6. Wicked problems have no given alternative solutions.
Explain an example of a wicked problem and justifications why it can be considered a wicked problem and how it satisfies each of the above characteristics.
Please read through the lecture notes on Wicket problem
Wicked Problems: Characteristics
Conklin offered a set of six defining characteristics:
1. You don’t understand the problem until you have developed a solution.
2. Wicked problems have no stopping rule.
3. Solutions to wicked problems are not right or wrong.
4. Every wicked problem is essentially unique and novel.
5. Every solution to a wicked problem is a ‘one shot operation.’
6. Wicked problems have no given alternative solutions.
Explain an example of a wicked problem and justifications why it can be considered a wicked problem and how it satisfies each of the above characteristics.
In: Computer Science
Create two lists; one contains 5 elements and the other one is empty. Write a python program that iterates through the first one, pops the elements from the end of it, then it pushes them one by one to the empty list. As your program iterates through the first list, clean it before processing the data, meaning if any element is like a special character ( , . ; : ) it must be discarded and not gets pushed to the second list.
In: Computer Science
Make a 20 by 20 matrix in which diagonal elements are 2, 5, 8, 11 ... 59 and the first column is 21,22,23,24 ... 40 whereas the rest of the elements of the matrix are 9.
Note: you must if, elseif, else, end or/and if, end or/and if, else, end commands in MATLAB.
In: Computer Science
This lab will focus on creating a better understanding of Selection Sort and Insertion Sort algorithms.
What you need to do
I have provided a driver and a Utility class with three methods. You must finish writing Selection Sort and Insertion Sort in the Utility class. Below is pseudocode for Selection and Insertion Sort, which you may use as a guide. Your selection sort will sort an array of Strings lexicographically, meaning A-Z. Your insertion sort will sort an array of Strings in reverse, meaning Z-A.
Selection Sort Pseudo Code
for i = 0 to length(A) min = i
for j = i to length(A) if A[j] < A[min]
min = j end for
swap A[i] and A[min]
end for
Insertion Sort Pseudo Code
for i = 1 to length(A) j=i
while j > 0 and A[j-1] < A[j] swap A[j] and A[j-1]
j=j-1 end while
end for
How do we compare strings to sort them correctly? Use the method compareTo provided in the string class. This method returns a int value and is used as follows:
<str1>.compareTo(<str2>)
If str1 comes before str2, compareTo will return a negative
number. If str1 comes after str2, compareTo will return a positive
number.
If str1 and str2 are the same, compareTo will return 0.
Driver Output
Unsorted array: Tom, Steve, Ann, Zoe, Bob, Moana, Naomi, Kevin, Ryan, Nina, Dora, Wanda, Eric
Selection Sorted array from A-Z:
Ann, Bob, Dora, Eric, Kevin, Moana, Naomi, Nina, Ryan, Steve, Tom,
Wanda, Zoe
Insertion Sorted array from Z-A:
Zoe, Wanda, Tom, Steve, Ryan, Nina, Naomi, Moana, Kevin, Eric,
Dora, Bob, Ann
Driver.java///////
public class Driver {
public static void main(String[] args) {
// TODO Auto-generated method
stub
String[] names = {"Tom",
"Steve","Ann","Zoe","Bob","Moana","Naomi","Kevin","Ryan","Nina","Dora","Wanda","Eric"};
System.out.println("Unsorted
array:");
Utility.printArray(names);
System.out.println();
Utility.selectionSort(names);
System.out.println("Selection
Sorted array from A-Z:");
Utility.printArray(names);
System.out.println();
Utility.insertionSort(names);
System.out.println("Insertion
Sorted array from Z-A:");
Utility.printArray(names);
}
}
Utility.java///////
public class Utility {
public static void selectionSort(String[] array)
{
//TODO - Sort array from A-Z
}
public static void insertionSort(String[] array)
{
//TODO - Sort array from Z-A
}
public static void printArray(String[] array) {
for(int i = 0; i < array.length;
i++) {
System.out.print(array[i]);
if(i !=
array.length -1) {
System.out.print(", ");
}
}
System.out.println();
}
}
In: Computer Science
What method does NOT cause the program to wait until a stream's buffer is empty? (a) flush (b) endl (c) clear (d) close (e) Multiple answers don't pause the program. (f) None of the above cause the program to pause.
I believe that clear is the answer.
flush pauses the program, endl (indirectly calls flush), close (calls flush).
In: Computer Science
General Questions about Network Footprinting
Guidelines
1. What is accomplished by network footprinting?
2. What are the countermeasures a network security architect can set in motion to diminish the threat from network footprinting?
3. What is the difference between network footprinting and
network reconnaissance?
4. In the context of network security, explain what is meant by
after reconnaissance comes penetration.
5. What is a denial of service (DOS) attack?
In: Computer Science
Write a function that will take a string containing only alphanumeric characters that are in lowercase (if you think your logic requires you to use more than one argument, please go ahead). Your task is to see if the string becomes a palindrome if only one character is removed from anywhere in the string.
In: Computer Science