Make an abstrakt about the topic " 6lowpan on network "، and should not be copy pasted from Google.
In: Computer Science
Write a Java program (name it PasswordTest) that reads from the user a string input (representing a password) and determines whether the password is “Valid Password” or “Invalid Password”. A valid password has at least 7 characters and includes at least one lower-case letter, at least one upper-case letter, at least one digit, and at least one character that is neither a letter nor a digit. Your program will need to check each character in the string in order to render a verdict. For example, CS5000/01 is invalid password; however, Cs5000/01 is a valid password. The program should display the entered password and the judgment as shown in the following sample runs:
Entered Password: CS5000/01
Verdict: Invalid Password
Entered Password: Cs5000/011
Verdict: Valid Password
Entered Password: MyOldDogK9
Verdict: Invalid Password
Entered Password: MyOldDogK9#
Verdict: Valid Password
Entered Password: Ab1#
Verdict: Invalid Password
Document your code, and organize and space out your outputs as shown. Design your program such that it allows the user to re-run the program with different inputs in the same run (i.e., use a sentinel loop structure).
In: Computer Science
Assignment Requirements
You have been working as a technology associate in the information systems department at Corporation Techs for almost three months now. Yesterday, you got an e-mail, which specified that a security breach has occurred in your company. The other members of your team also received such e-mails. You checked the firewall logs and it confirmed the security breach.
Later, your team took corrective actions in the environment. They isolated the incident and assessed the damage. Today, your manager calls you and asks you to create an executive summary report detailing the events to be presented to executive management. You need to include a summary of corrective options, which may be in the form of architectural adjustments or other configuration changes that will prevent the reoccurrence of this incident in the future.
Tasks
You need to create a post-incident executive summary report that addresses a security breach. Include an overview of actions taken at each phase of the incident response. Also include suggestions for corrective modifications that would prevent the incident from reoccurring.
In: Computer Science
using python 3
2. Write a python program that finds the numbers that are divisible by both 2 and 7 but not 70, or that are divisible by 57 between 1 and 1000.
3. Write a function called YesNo that receives as input each of the numbers between 1 and 1000 and returns True if the number is divisible by both 2 and 7 but not 70, or it is divisible by 57. Otherwise it returns False.
4. In your main Python program write a for loop that counts from 1 to 1000 and calls this YesNo function inside the for loop and will print "The number xx is divisible by both 2 and 7 but not 70, or that are divisible by 57" if the YesNo function returns True. Otherwise it prints nothing. Note the print statement also prints the number where the xx is above.
In: Computer Science
Simple shell scripting
Write a Bash shell script called strcount.sh that counts the number of occurances of a given string within a file. The scripts takes two arguments: the name of the file to check and the string to count occurances of. If the file is not found (or not readable), the script should print the error message Cannot access file and exit with code -1. Otherwise, the script should print the number of occurances of the given string and exit with code 0. If the user fails to specify two arguments, the script should print the error message Usage: strcount.sh <file> <string> and exit with code -1.
Thus, if I have the following file penguins.txt:
Galapagos penguin Erect-crested penguin Subantarctic gentoo penguin Royal penguin Humboldt penguin Eastern rockhopper penguin Fiordland penguin Allied king penguin Ellsworth's gentoo penguin White-flippered penguin Cook Strait little penguin Chatham Island little penguin
Then the output should be the following:
ekrell@ekrell-desktop:~$ ./strcount.sh penguins.txt little 2
Or if the file does not exist:
ekrell@ekrell-desktop:~$ ./strcount.sh badfile.txt little Cannot access file
Or if the user fails to specify two arguments:
ekrell@ekrell-desktop:~$ ./strcount.sh Usage: strcount.sh <file> <string>
Write your script here
<- ... -> <- ... -> <- ... -> <- Add as many lines as you need ->
Credit
Material adopted from http://faculty.smu.edu/hdeshon/
In: Computer Science
There will be three grades for each student in "grades.txt" (see example file bellow). In "student.txt" there are two students first and last names. In "grades.txt" the grades for each student will be on the same line number as the students name was on in "students.txt".
So if line 1 of "students.txt" contains:
Joe Blow
then line 1 of "grades.txt" would contain Joe Blow's grades:
85 54.3 56
Into an output file called "report.txt" output the student's last name then a comma the their first name. Following this, calculate their average and assign a letter grade using the following scale:
'A': grade >= 90
'B': 90 > grade >= 80
'C': 80 > grade >= 70
'D': 70 > grade >= 60
'F': grade < 60
If the final grade of a student is greater than 100 instead of printing their letter grade output the statement "Teacher was far too easy". The "report.txt" should have a heading on each of the columns the first saying "Student's Name" and the second saying "Student's Grade".
In: Computer Science
Please write a JAVA program which reads a number n from the user and check whether n is a perfect number or not. For example, when n = 7, the print out should be 7 is not a perfect number. If the input n is 6, then the program prints out 6 = 1 * 2 * 3
In: Computer Science
Show what is written by the following segment of code, given item1, item2, and item3 are int variable:
item1 = 4;
item3= 0;
item2 = item1 + 1;
stack.Push(item2);
stack.Push(item2 +1);
stack.Push(item1);
item2 = stack.Top();
stack.Pop();
item1 = item2 + 1;
stack.Push(item1);
Stack.Push(item3);
while (!stack.IsEmpty())
{
item3 = stack.Top():
cout <<item3<<endl;
stack.Pop();
}
cout<<item1 <<endl <<item2<<endl<<item3<<endl;
In: Computer Science
The Monty Hall problem solved on Matlab. Please show code. You are given a choice between three doors. Behind one door is a new car and behind the other two doors is a goat. You first pick one of the doors at random. Then, a door with a goat is opened for you. You are then given the option to switch your door to the other unopened door. Should you do this? What are your odds of winning if you switch vs not switching? Show using matlab with a large number of runs, where you keep your selection 50% of the time and switch 50% of the time.
In: Computer Science
Given a generic array with ‘n’ items (not only integers). Give a solution for checking whether there are any duplicate elements in the array or not? You just need to return a boolean (true or false). State the complexity of your solution. Can you come up with another solution that has O(n logn) complexity? Explain.
In: Computer Science
Write a program to simulate an experiment flipping three coins. Each time the three coins are flipped, is called a “trial”. A coin flip can randomly result in either “Heads” (1) or “Tails” (0) Allow the user to enter the number of “trial”s to simulate. Print out each coins’ result after each “trial”. Use seed value 1234. Tally up and determine what percentage of “trial”’s all three coins land on “Heads” in the simulation. C language
In: Computer Science
In MATLAB write a function secant.m to apply the secant method.
function [x,i] = secant(f, x0, x1, tol, maxiters)
[x,i] = secant(f, x0, x1, tol, maxiters) performs the secant method with f(x), starting at x_0 = x0 and x_1 = x1, and continuing until either |x_i+1 - x_i| <= tol, or maxiters iterations have been taken. The number of iterations, i, is also returned. An error is raised if the first input is not a function handle. A warning is raised if the maximum number of iterations is reached without achieving the tolerance.
Test the function on the problem f(x) = 0.9 cos(x) - sqrt(x) = 0, with starting values x0 = 0 and x1 - 1, and a tolerance of 10^-8 and maxiters of 20.
In: Computer Science
Write a C function to calculate and return the factorial value
of any positive integer as an
argument. Then call this function from main() and print the results
for the following input
values:
2, 3,4, 5, 10, 15
What is the maximum value of an integer for which factorial can be
calculated correctly on a
machine using your algorithm?
In: Computer Science
In c++
This question is relevant if you implemented a polynomial that included some calculus-based operations such as derivative and integral. Write a new function that meets the following specification:
double slope(const polynomial& p, double x)
// POSTCONDITION: The return value is equal to the slope of the
// polynomial p, evaluated at the point x.
In: Computer Science
import java.util.Scanner;
public class Grade {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
// Reading score from user
System.out.println("Enter the student's score:");
double score = scnr.nextDouble();
System.out.print("Grade:");
// Checking if score is less than 60
if(score<60){
System.out.println("F");
}
// Checking if score is less than 70
else if(score<70){
System.out.println("D");
}
// Checking if score is less than 80
else if(score<80){
System.out.println("C");
}
// Checking if score is less than 90
else if(score<90){
System.out.println("B");
}
// Checking if score is less than 100
else {
System.out.println("A");
}
}
}
I need this codes output to say
Enter the student's score:
A
and mine says
Enter the student's score:
Grade: A
How do I fix that in my code?
In: Computer Science