Using the combination of HTML and PHP, implement a web page where the users can upload a text file, exclusively in .txt format, which contains a string of 1000 numbers, such as:
71636269561882670428252483600823257530420752963450
85861560789112949495459501737958331952853208805511
65727333001053367881220235421809751254540594752243
52584907711670556013604839586446706324415722155397
53697817977846174064955149290862569321978468622482
83972241375657056057490261407972968652414535100474
82166370484403199890008895243450658541227588666881
96983520312774506326239578318016984801869478851843
12540698747158523863050715693290963295227443043557
66896648950445244523161731856403098711121722383113
05886116467109405077541002256983155200055935729725
16427171479924442928230863465674813919123162824586
17866458359124566529476545682848912883142607690042
24219022671055626321111109370544217506941658960408
07198403850962455444362981230987879927244284909188
84580156166097919133875499200524063689912560717606
62229893423380308135336276614282806444486645238749
73167176531330624919225119674426574742355349194934
30358907296290491560440772390713810515859307960866
70172427121883998797908792274921901699720888093776
Your code should contain a PHP function that, accepting the string of 1000 numbers in input, is able to:
1) Find the 5 adjacent numbers that multiplied together give the largest product.
2) Given the product from above, computes the sum of the factorial of each term of such product
Example, if the product is 5046, computes 5! + 0! + 4! + 6!
NOTE:
In: Computer Science
How would you reply to this discussion:
Cloud Computing is a way to store massive amounts of information on remote servers. Unlike saving information on your local hard drive or flash drive, cloud storage is almost like a magical place that keeps (so we hope) your information safe and secure. A couple of different cloud computing examples are.
1. Communication: these would be examples of Skype or WhatsApp. I have used both applications, though I haven't used skype in many years, I currently use WhatsApp daily,
2. Backup and Recovery: Large storage to save your information. I always like to say, It's somewhere in the cloud. Examples, Dropbox, Google Drive, and Amazon S3. Out of these three, I have only used Dropbox, this was used during my Web Design class.
3. Social Networking: We all know about social networking, we all may use them on a daily basis. Also, social networking is the most popular of cloud computing. Some examples are Facebook, LinkedIn and Instagram to name a few.
This week I actually learn a lot. Back in my computer help desk days, I remember building a computer by imaging. But it was different to see the different way to divide the disk space. Very interesting.
In: Computer Science
Software Decode: Write a function that accepts an in-order array of unsigned integer values. The function shall then scan the array for a specific pattern: Three values contained within the array equally spaced 20 units apart. The function shall return the index position within the original array where the pattern begins or -1 if not present.
Given the input array: data[] = {10,20,31,40,55,60,65525} The function shall return: 1
IN JAVA PLEASE
In: Computer Science
C++
1. The function removeAt of the class arrayListType removes an
element from the list by shifting the elements ofthe list. However,
if the element to be removed is at the beginning ofthe list and the
list is fairly large, it could take a lot ofcomputer time. Because
the list elements are in no particular order, you could simply
remove the element by swapping the last element ofthe list with the
item to be removed and reducing the length of the list. Rewrite the
definition of the function removeAt using this technique.
2. The function remove of the class arrayListType removes only the
first occurrence of an element. Add the function removeAll to the
class arrayListType that would remove all occurrences of a given
element. Also, write the definition ofthe function removeAll and a
program to test this function.
From the textbook Data Structures using C++ by D. S. Malik
In: Computer Science
IS 633 Assignment 1
Due 9/27
Please submit SQL statements as a plain text file (.txt). If blackboard rejects txt file you can submit a zipped file containing the text file. Word, PDF, or Image format are not accepted. You do not need to show screen shot. Make sure you have tested your SQL statements in Oracle 11g.
Problem 1. Please create the following tables for a tool rental database with appropriate primary keys & foreign keys. [30 points]
Assumptions:
The list of tables is:
Tables:
Cust Table:
cid, -- customer id
cname, --- customer name
cphone, --- customer phone
cemail, --- customer email
Category table:
ctid, --- category id
ctname, --- category name
parent, --- parent category id since category has a hierarchy structure, power washers, electric power washers, gas power washers. You can assume that there are only two levels.
Tool:
tid, --- tool id
tname, --- tool name
ctid, --- category id, the bottom level.
quantity, --- number of this tools
Time_unit table allowed renting unit
tuid, --- time unit id
len, --- length of period, can be 1 hour, 1 day, etc.
min_len, --- minimal #of time unit, e.g., hourly rental but minimal 4 hours.
Tool_Price:
tid, --- tool id
tuid, --- time unit id
price, -- price per period
Rental:
rid, --- rental id
cid, --- customer id
tid, --- tool id
tuid, --- time unit id
num_unit, --- number of time unit of rental, e.g., if num_unit = 5 and unit is hourly, it means 5 hours.
start_time, -- rental start time
end_time, --- suppose rental end_time
return_time, --- time to return the tool
credit_card, --- credit card number
total, --- total charge
Problem 2. Insert at least three rows of data to each table. Make sure you keep the primary key and foreign key constraints. [20 points]
Problem 3. Please write ONE SQL statement for each of the following tasks using tables created in Problem 1. You can ONLY use conditions listed in the task description. Task 1 and 2 each has 5 points. Tasks 3 to 6 each has 10 points. [50 points]
Task 1: return IDs of rentals started in August 2019.
Hint: function trunc(x) converts x which is of timestamp type into date type.
Task 2: Return names and quantity of all tools under the category carpet cleaner. You can assume there is no subcategory under carpet cleaner
Task 3: return number of rentals per customer along with customer ID in the year 2019 (i.e., the start_time of the rental is in 2019).
Task 4: return IDs of tools that has been rented at least twice in 2019.
Task 5: return the price of renting a small carpet cleaner (the name of the tool) for 5 hours.
Hint: find unit price for hourly rental and then multiply that by 5.
Task 6: return names of customers who have rented at least twice in year 2019 (i.e., rental’s start time is in 2019).
In: Computer Science
implement the reverse() method that changes the ordering of the items within a doublylinkedlist class. don't return anything and make sure it executes without errors on lists with no items or one item
example:
fruits = DoublyLinkedList() fruits.append('apple') fruits.append('banana') fruits.append('cherry') for i in fruits: print(i) >> apple >> banana >> Charlie fruits.reverse() for i in fruits: print(i) >> cherry >> banana >> apple
In: Computer Science
I am trying to tokenize a string using a function by passing the char string[] and char *pointer[100]. While I have working code inside the int main(), I am having trouble actually declaring the parameters for the function.
I know how to pass the char array (char string[]), but not how to pass the char pointer array (char *pointer[100]).
This is my code below:
int main() {
// Declare variables
char str[] = "this is a test only - just a
test"; // char array
char *ptr1[100], *ptr2[100];
// Creates
two pointers
function1(str, *ptr1[100]);
return 0;
}
void function1(char str[], char *ptr1[100]) {
int i = 0;
int count = 0;
// Declaration of strtok: char
*strtok(char *str, const char *delim)
// It breaks *str into a series of
tokens using *delim
char *p = strtok (str, " ");
// Stores each piece into the
array
while (p != NULL) {
ptr1[i++] =
p;
p = strtok(NULL,
" ");
count++;
}
// Prints the array
for (i = 0; i < count; ++i)
{
printf("%s\n",
ptr1[i]);
}
}
For my code, it works if I get rid of the function and simply place the code in my int main(). Other times, I manipulated the second parameter and it started to work. However, the return values from 'p' transformed into integers from the "ptr1[i++] = p" portion of the code.
In: Computer Science
Lab Assignment 1
2020 – 2021 Fall, CMPE 211 Fundamentals of Programming II
STUDENT AFFAIRS
DUE DATE: 14.10.2020 – 23:59
In this lab, we will create a model course registration application. Please check out the example run of the program first.
You are asked to implement the classes;
The commands and their arguments for this week are:
where letterGrade can be (AA, BA, BB, CB, CC, DC, DD, F, FX).
In order to store the students and the courses, create 2 Arrays for them in the StudentAffairs class. You need to take commands from user until you see the “Q” command. For this purpose, you need to create while loop. Stopping condition of this command is “Q” command from user. Each command needs to be differentiated either if clause or switch case. After each command differentiated, specific information subcommands will be taken that belongs the specific main command parsed with space. Each command has specific things to do and command line output that will inform the user. Look at the demo video for better understanding. However, at first you need to create Student, Course and Grade classes.
Grade Class
Data Declarations:
Student Class
Data Declarations:
Course Class
Data Declarations:
In: Computer Science
A company has changed their web hosting policy and now requires SSL certificates on all web servers. Users are reporting that they can no longer access an internal website. Which of the following commands should the administrator run to determine if port 443 is listening? (Select two.)
A. traceroute
B. telnet
C. netstat
D. ipconfig
E. nslookup
Thumbs up for explanation!
In: Computer Science
Draw the class diagram in draw.io software for an Airline Reservation system.
In: Computer Science
This is for CYBER SECURITY
1)What are the 3 factors of Authentication and provide at least 3 examples for each?
2) Please compare and
contrast the following 4 Access Control Models and let me know how
they work and give me an example of each.
1. Discretionary Access Control
2. Mandatory Access Control
3. Rule Based Access Controls
4. Role Based Access Controls
In: Computer Science
In: Computer Science
Telecommunication Governance 1:
Give at least 3 real life examples of the impact vs. probability risk management actions and their individual application.
In: Computer Science
In: Computer Science
Assume that you have the following MAC address 01:00:5e:XX:XX:XX (where the last 3 bytes matches the last 3 bytes of your own device MAC address), figure out what IPv4 multicast address does this MAC address belongs to?
In: Computer Science