PHP* Write a function that searches an array of names (unsorted) for the name "Bob" and returns the location in the array. If Bob is not in the array, return -1. Examples findBob(["Jimmy", "Layla", "Bob"]) ➞ 2 findBob(["Bob", "Layla", "Kaitlyn", "Patricia"]) ➞ 0 findBob(["Jimmy", "Layla", "James"]) ➞ -1 Notes ● Assume all names start with a capital letter and are lowercase thereafter (i.e. don't worry about finding "BOB" or "bob").
Q: One connection may send several packets between hosts. Shipment clearance times, please. Is one…
A: When data is transmitted between hosts on a computer network, it is typically broken up into smaller…
Q: What new developments are taking place in the world of business? Learn more about a current event…
A: Artificial intelligence (AI) has made noteworthy advancements in recent years, transforming numerous…
Q: Who inside an organisation is tasked with deciding where in the hierarchy the information security…
A: Most of the time the decision of the security function does vary based on the various factors in the…
Q: a) Explain how dividing a large network into areas and a backbone area scales OSPF routing. What are…
A: OSPF (Open Shortest Path First) is a type of link-state routing protocol used to determine the…
Q: The following table shows the predictions made by a 2-bit prediction scheme for 4 different branch…
A: The efficiency of branch instructions, which are instructions that alter the course of programme…
Q: What makes private cloud services different from public cloud services? Which business plan would be…
A: What is cloud computing: Cloud computing refers to the delivery of computing resources, such as…
Q: Find out how the stack acts when it is allowed to function on its own and record your findings.
A: The stack is commonly used in computer programs to manage function calls, local variables, and other…
Q: You should explain how wrapper classes may be used to prevent the issues that arise from utilising…
A: In java programming there are various data types such as the int , float , double and char are not…
Q: Under what circumstances should individuals take precautions? What are the reasons for a business to…
A: Precautions are necessary measures taken to prevent harm or reduce the risk of an undesirable…
Q: Provide an example of each of these three restrictions and describe how they may be implemented to…
A: Encryption is critical to securing data transmitted over networks. Inside transport layer security,…
Q: Within the realm of big data and cloud computing, what constitutes a distributed lock service?
A: A distributed lock service is a harmonization mechanism used in dispersed systems to ensure that…
Q: Explain I/O. Explain how certain input/output devices send/receive, input/output, and are connected.
A: Input/output (I/O) passing on data connecting a computer then its peripherals or other outside…
Q: Explain what an API is and how it relates to system calls.
A: An API (Application Programming Interface) is a collection of protocols, procedures, and tools…
Q: Make a client that runs the following test T times and takes M, N, and T as input: Count the number…
A: Program to a client that executes the following test T times and accepts the integers M, N, and T as…
Q: Create a Python programme that reads a string list from the user and stores it in a dynamic array.…
A: Hi. Check below for your python program
Q: Why does interest in computers appeal to individuals of all ages and backgrounds so much?
A: Interest in computers has been growing for decades, and it seems to appeal to people of all ages and…
Q: 17.1.5Calculate the reliability of the system diagram in Figure 17.10.
A: A System Reliability defines the probability that a system does not fail in the required…
Q: How would you connect the hub and spokes of a local area network? What kind of cable would you use…
A: 1) A hub and spoke is a networking architecture in which a central hub connects multiple devices or…
Q: The topic of credit card safety warrants discussion, and it is imperative to delineate specific…
A: Credit cards are an essential tool for consumers to make purchases and access credit. However,…
Q: X=2 Y=2 DO 30 1 = 3, 8, Y X=X+1 30 Continue X=2*X+1 DO 40 J = X, 50, 5 X = Y*X 40 Continue write…
A: Start Initialize variables X and Y to 2. Enter a loop that iterates over I from 3 to 8 in steps of Y…
Q: Which of these protocols, OSPF or RIP, is most analogous to BGP? Why?
A: OSPF (Open Shortest Path First) and RIP (Routing Information Protocol) are both interior gateway…
Q: 4.__________code following.
A: The main function takes two arguments: argc and argv. argc is an integer that specifies the number…
Q: In LC-3. Modify the code to satisfy the Description of Code Requirements: Reads two (2) values…
A: .ORIG x3000 ;*** Read startVal from memory and display message about its status LDR R1, startVal…
Q: How has the introduction of Very Large Scale Integration (VLSI) technology contributed to the…
A: The performance of computer systems has been significantly improved because of the development of…
Q: Change the Stack iterator function so that it throws a java.util exception right away.If the client…
A: According to the information given:- We have to define change the Stack iterator function so that it…
Q: Describe how advancements in Very Large Scale Integration (VLSI) technology have increased the…
A: Advancements in Very Large Scale Integration (VLSI) technology have revolutionized the computing…
Q: List DBA configuration management responsibilities
A: Database Administration (DBA) is a critical function in IT organizations responsible for managing…
Q: Addressing and Address Binding: Choose all true assertions. Direct addressing involves a remote…
A: The question asks you to identify the true assertions regarding addressing and address binding.…
Q: When playing music on an Eb Alto Saxophone, the fingers press some keys more than others. For…
A: Given, When playing music on an Eb Alto Saxophone, the fingers press some keys more than others.…
Q: What are the main distinctions between a secondary index and a clustering index?
A: Here is your solution -
Q: What are the advantages of using multithreading instead of multiple processes?
A: In the realm of programming, we frequently encounter circumstances in which we must accomplish…
Q: What is the comparative context in which information security management holds significance?
A: What is an information: Information refers to data that has been processed, organized, or…
Q: Which C++ header file must be included in order to make advantage of OOP? Which property (2)…
A: To use OOP (Object-Oriented Programming) ideas in C++, the header file "iostream" must be included.…
Q: How are these done. Alternatively you could have:EXPAMPLES: 456.7 MHz * 1,000,000 w/s / MHz =…
A: The question is related to converting frequency measurements in MHz, KHz, and GHz to W/s. The…
Q: What exactly is critical thinking? Creation of software.
A: 1) Critical thinking is a cognitive process that involves analyzing, evaluating, and synthesizing…
Q: The implementation of QueueLists makes use of a CircularList. Implement QueueLists in a manner that…
A: A queue is a data structure that follows the FIFO (First-In-First-Out) principle, meaning that the…
Q: Networks Explain in your own words the characteristics of the different topologies. Distinguish…
A: In computer science, topology refers to the arrangement and connectivity of network components, such…
Q: In java code What is the output of this code segment: String s1 = "Hello"; String s2 = new…
A: 1. Define a class named StringComparison.2. Define a main method that takes an array of strings as…
Q: Understanding is facilitated by the use of concrete examples. There are four main subfields within…
A: Using concrete examples helps in understanding complex concepts. Network analysis is a…
Q: What was the justification for Target's decision not to employ a chief information security officer…
A: Target experienced a significant data breach in 2013 in which the personal information of millions…
Q: Describe how we might efficiently implement a Queue as a pair of Stacks, called a “stack pair.”…
A: To implement a Queue as a pair of Stacks, we can use two stacks and maintain the following…
Q: Different area managers. They're revising security regulations. You don't want to remove their local…
A: In today's digital age, security has become a major concern for businesses and organizations…
Q: 6. Technology Involved. How is the organization of Tesla company set up in terms of its IT…
A: The current AI technologies that Tesla is using in its cars are based on unsupervised machine…
Q: Create a stored procedure using the companyname, latest order date, and ship address for A-starting…
A: Stored processes are database matches that may be reused for a predefined set of operations. By…
Q: Construct a truth table (Tautology) to test if the statement is valid. It is not sunny this…
A: To construct a truth table to test the validity of the argument, we need to break it down into its…
Q: Browse Project Gutenberg (https://www.gutenberg.org/) for plain text versions of one or more works…
A: Start Get the file name from the command line or interactively. Read the file and store each line in…
Q: Which sections of the IP datagram in this sequence of ICMP signals issued by your machine are…
A: As the Internet and computer networks continue to grow in complexity, the need to understand the…
Q: Staggered addressing is a technique employed in disc systems to reduce the amount of time lost due…
A: Staggered addressing is indeed a key concept in the design of disk drives, which are used for…
Q: Objective In this lab final, teams will demonstrate network design and setup. IP address…
A: In this lab final, the objective is to design and set up a network for a three-location business.…
Q: When it comes to networks, what options do you have for services?
A: There are various types of networks, and each has different options for services. Here are some…
PHP*
Write a function that searches an array of names (unsorted) for the name "Bob" and returns the location in the array. If Bob is not in the array, return -1.
Examples
findBob(["Jimmy", "Layla", "Bob"]) ➞ 2
findBob(["Bob", "Layla", "Kaitlyn", "Patricia"]) ➞ 0
findBob(["Jimmy", "Layla", "James"]) ➞ -1
Notes ● Assume all names start with a capital letter and are lowercase thereafter (i.e. don't worry about finding "BOB" or "bob").
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- javascript only: Write a function `popularLetters(string)` that takes a string as an argument and returns an array of all of the characters that appear five or more times in the string. Examples: console.log(popularLetters('apple')); // [] console.log(popularLetters('bananas in pajamas')); // [ 'a' ] console.log(popularLetters('Yes, we have no bananas, we have no bananas today!')); // [ 'e', ' ', 'a', 'n' ]3. Implement a function called findLargestIndex which returns the index of the rowwith the largest sum.ex. int array[3][6] = {{3, 6, 8, 2, 4, 1}, // sum = 24{2, 4, 5, 1, 3, 4}, // sum = 19{1, 0, 9, 0, 1, 0}}; // sum = 11If the findLargestIndex function was called using this array, it would return 0, asit is returning the index of the row, not the sum.Note that the number of columns is required when passing a 2d array to a function.Assume that 2D arrays passed to this function will have 6 columns.Title line: int findLargestIndex(int array[][6], int rows, int columns);Functions with 2D Arrays in Java Write a function named displayElements that takes a two-dimensional array, the size of its rows and columns, then prints every element of a two-dimensional array. Separate every row by a new line and every column by a space. In the main function, call the displayElements function and pass in the required parameters. Output 1 2 3 4 5 6 7 8 9
- In C programming: Write a function printAllCourses() which receives an array of course pointers and the array’s size, then prints all courses in the array by calling printCourseRow()javascript Define a function, myIncludes, that accepts two parameters: an array and a searchValue. myIncludes should return true if the searchValue is an element in the array. Otherwise, myIncludes should return false. example myIncludes([10, 20, 30], 20); // => true myIncludes(['apples', 'bananas', 'citrus'], 'pears'); // => falseJava - Functions with 1D Arrays Create a program that asks the user for the size of an integer array and the elements of the array. Then, create a function called maxArray() with the following details: Parameters: An integer array The size of the integer array Return type - int Return value - the maximum value of the integer array Call the function you created in the main and pass the integer array and its size to it. Make sure to store the return value in a variable so you could print it afterwards. Input 1. First line contains the size of the array 2. Succeeding lines are the elements of an array 3. First line contains the size of the array 4. Succeeding lines are the elements of an array 5. First line contains the size of the array 6. Succeeding lines are the elements of an array 7. First line contains the size of the array 8. Succeeding lines are the elements of an array Output Enter size of array: 5 Enter element 1: 1 Enter element 2: 2 Enter…
- PHP* Create a function that takes a list of numbers and returns the second largest number. Examples secondLargest([10, 40, 30, 20, 50]) ➞ 40 secondLargest([25, 143, 89, 13, 105]) ➞ 105 secondLargest([54, 23, 11, 17, 10]) ➞ 23 Notes ● There will be at least two numbers in the array.5. Write a Python function that inputs an array of integers and returns the maximum value in this array. Do not use the max method on array class. 6. Write a Python program that inputs a sentence string by the user and counts the number of words in the sentenceIn C Programming: Write a function inputAllCourses() which receives an array of course pointers and the array’s size, then allows the user to input all courses in the array by calling inputCourse()
- JAVA program Write a Java program that asks the user to enter an array of integers. The program should prompt the user for the number of elements in the array and then the elements of the array. The program should then call a method named minGap that accepts the array entered by the user as a parameter and returns the minimum 'gap' between adjacent values in the array. The main method should then print the value returned by the method. The gap between two adjacent values in an array is defined as the difference in value between the first element and the second element. For example, suppose the user entered the following array of integers {1, 3, 6, 5, 12} The first gap is 2 (3 - 1), the second gap is 3 (6 - 3), the third gap is 1 (6 - 5) and the fourth gap is 5 (12 - 6). Thus, the call of minGap(array) should return 1 because that is the smallest gap in the array. If you are passed an array with fewer than 2 elements, you should return 0. Use Math.abs()JAVA program Write a Java program that asks the user to enter an array of integers. The program should prompt the user for the number of elements in the array and then the elements of the array. The program should then call a method named minGap that accepts the array entered by the user as a parameter and returns the minimum 'gap' between adjacent values in the array. The main method should then print the value returned by the method. The gap between two adjacent values in an array is defined as the difference in value between the first element and the second element. For example, suppose the user entered the following array of integers {1, 3, 6, 5, 12} The first gap is 2 (3 - 1), the second gap is 3 (6 - 3), the third gap is 1 (6 - 5) and the fourth gap is 5 (12 - 6). Thus, the call of minGap(array) should return 1 because that is the smallest gap in the array. If you are passed an array with fewer than 2 elements, you should return 0.Circular Array 1. Palindrome Use python Write a method/function that takes in a circular array, its size and start index and finds whether the elements in the array form a palindrome or not. Return true if the elements form a palindrome, otherwise, return false. Example: Input: [20,10,0,0,0,10,20,30] (start =5, size=5) Output: True. Input:[10,20,0,0,0,10,20,30] (start =5, size=5) Output: False