In the context of the same file management system, it is planned to offer a sorted view of files by name. For that purpose, there is a need for a compare function that takes two strings (file names) and returns: 0: if both files are the same -1: if the first string comes alphabetically before the second string 1: if the first string comes alphabetically after the second string Examples: compare (abc, abc) → 0 compare (abc, de) → -1 compare(xyz abcde) 1
Q: Write a python program based on the discussion we had on the last day of class, to train a network…
A: import mathimport randomimport matplotlib.pyplot as plt import numpy as npdef s(x): return1/(1+…
Q: what is disadvantage of cascaded synchronizer? and how to solve this problem using handshake method?
A: Answer A disadvantage of a cascaded synchronizer is that it can introduce long latency in the system…
Q: The fundamental focus of conceptual data models, a kind of data model used in computing systems, is…
A: Definition: The semantic data model is a technique for organising data in such a way as to portray…
Q: When it comes to security, can one detect the difference between the various authentication methods?
A: Differentiated: Being valued. Outstanding people are often older, smarter, and more accomplished…
Q: A Centralized Architecture _________________, while a Service Oriented Architecture____________.…
A: Answer Option e None of the answer listed are corrected Centralized Architecture and Service…
Q: In today's modern world, computers are ubiquitous, permeating every part of society from the…
A: Artificial intelligence has played a vital part in the growth of computers, which has greatly…
Q: This is a consequence of the ever-increasing power of computers in recent years. How did computers…
A: INTRODUCTION: The power of computers has been available to us since the invention of computers, but…
Q: 3. Let g: Z→ Z be defined by g(m) = m + 5. Is Is g a bijection? Explain. If g is a bijection, find…
A: If a function has inverse it must be bijective. Bijective Function: If a function is said as the…
Q: Give a comprehensive account of how a programming language was created.
A: Explanation: In the world of computers, there are over 500 different programming languages, each…
Q: In many ways, portable computers and mobile devices seem to be different. If you want to win an…
A: The most obvious difference between a cell phone and a computer is their size. Cell phones are much…
Q: For example, what does it mean if an assault is carried out utilizing a poison package, and what…
A: ARP Poisoning often referred to as ARP Spoofing, is an Internet attack on the Local Area Network…
Q: In contrast to microcomputers, which have input/output (I/O) devices, microprocessors have none of…
A: Microprocessors Almost every contemporary piece of technology has a microprocessor, sometimes known…
Q: Question 2) For the following shift register, if the input data is 101100112, a₁ Data In- CLK Do ão…
A:
Q: imize the CPU time wasted by concurrently executing several instructions? Which steps in this…
A: Introduction: The timer device, the related timer interrupts, and scheduler OS code are used to…
Q: Explain how you would go about optimizing a program to run fast and efficiently on a modern…
A: Computer architecture pipelines: It is a method for gathering processor instructions into a…
Q: The names, locations, and contact information for 10 internationally recognized individuals in the…
A: The World of Computer Science and Information Technology Journal (WSCIT) is a journal that publishes…
Q: Creating compilers and assemblers that reorder instructions in assembly language to reduce pipeline…
A: Assembly language is a type of programming language that lets you talk to the computer directly.…
Q: Describe the different DNS record formats. Each one requires an in-depth analysis, complete with…
A: This question was addressed How DNS OperatesDNS is a global infrastructure for translating IP…
Q: A better design would be one with the following tables: Patient : | pid | name…
A: GIVEN: Patient : | pid | name | dob | addr | tel | Exam…
Q: PLEASE SOLVE THANK YOU
A: Coded using Python 3.
Q: In a binary search tree, the getInorderIterator inherited from the class BinaryTree sorts data - in…
A: Let's see the answer:
Q: N=9 CRIBRAR文文 (大大大大大大大 23*****45 678***901 2345*6789 012***345 67*****89 ******* 大大大大大卖卖卖
A: We need to write a C code for the given pattern.
Q: Suppose the following function has been defined: string concatenateWith Self(string inputString) {…
A: Function: It is mainly used to repeatedly use the block of statements of a function by just calling…
Q: Write a function called word_jumble() that accepts a one word string from the user. The function…
A: Dear Student, The source code, implementation and expected output is given below -
Q: The ability to operate a computer effectively may open many doors. What are the possible benefits of…
A: In contemporary civilization, computer-related technologies have been extensively accepted. The…
Q: Microprocessors and the systems they are incorporated into now prioritize addressing constraints…
A: Subprograms, often known as functions, are the foundation of procedure-oriented programmes. These…
Q: s. While watching television you might have experienced blurring and flickering of the image that…
A: Smart TVs require regular over-the-air updates. In some cases, your TV screen might flicker due to…
Q: 1-Translate the following C++ program to MIPS assembly program (Please ex- plain each instruction in…
A: Step 1:Initialize variable sum. Step 2:initialize sum variable sum = 0; Step 3:Loop through all the…
Q: The term "Network Database System" is used to describe a kind of database management software that…
A: Multiple member records or files may be linked to various owner records or files, and vice versa, in…
Q: lease draw the Olympic Rings. You can output many stars (*) to form a rings, but the parameter of…
A: In this question we have to draw Olympic Rings using C++without using graphics and just using stars…
Q: Examine the differences between procedural and object-oriented languages.
A: Introduction: Procedural Language Procedural programming, which is based on the idea of invoking…
Q: Each of the following subquestions contains a Python function. State the number of test cases you…
A: 1. def get_word_for_tem(temp:int)->str: '''Return a descriptive message appropriate for the…
Q: Advantages and drawbacks exist for both object-oriented and procedural programming languages.
A: Object-oriented programming is a programming model which is based upon the concept of objects which…
Q: Question 15 kk .The FAT File System is not kept in memory True False Full explain this question…
A: Dear Student, The answer to your question is given below -
Q: The proliferation of telephones has prompted a range of societal responses.
A: The proliferation of telephones has had a wide range of impacts on society. In terms of…
Q: Do you favor synchronous or asynchronous buses when accessing the computer's central processing unit…
A: Answer A bus is a group of cables that connect one or more subsystems of a single device. Bits can…
Q: Advantages and drawbacks exist for both object-oriented and procedural programming languages.
A: Introduction: Object-oriented programming (OOP) is a programming paradigm that is built on the…
Q: I am creating a shopping site in javascript and HTML. I need to create a checkout page that says the…
A: Introduction: Javascript is a programming language used in web development. When working with files…
Q: a loop hat subtracts element in the assigns the element with 0. Ex: lowerScores = {5, 0, 2, -3)…
A:
Q: It would be very appreciated if you could elaborate on the function of the authentication procedure.…
A: Introduction: Verifying a user's identity is the process of authentication. With this method,…
Q: When you mention "authentication aims," what precisely do you mean? Examine the strengths and…
A: Authentication is the process of determining whether someone or something is, in fact, who or what…
Q: CHALLENGE ACTIVITY Assign a pointer to any instance of searchChar in personName to search Result.…
A: Coded using C++.
Q: Is the internet fostering or discouraging social harmony? Describe your first response, and then…
A: Introduction: The Internet is the information-age equivalent of the electric motor in the industrial…
Q: Section: Debugging Define and describe 1. What a bug is. 2. What debugging is and why debugging is…
A: Debugging, in computer programming and engineering, is a multistep process that involves identifying…
Q: Selecting the best programming language is a time-consuming procedure.
A: A programming language is nothing more than the collection of guidelines that are followed while…
Q: The aforementioned concepts form the foundation of every high-level language.
A: High-level language which refers to the higher level of abstraction from the machine language and…
Q: Investigate the pros and cons of magnetic secondary storage systems in relation to solid-state…
A: Introduction:Secondary storage devices made entirely on the solid state: Advantages of Solid-State…
Q: please convert the code to use class( OOP).
A: In this question we have to write a code in C++ program to convert into OOPS LET'S CODE
Q: Why is it beneficial to use several authentication factors? To what extent does it help to prevent…
A: Multifactor Authentication: Multifactor Authentication is an electronic authentication method in…
Q: topic or articles about Facebook benefits including topic sentence, thesis, support sentences,…
A: Answer Facebook is a popular social networking website founded in 2004 by Mark Zuckerberg and his…
Step by step
Solved in 2 steps
- Computer Science Write a C/C++ program, call it findExt, to find all files in a directory hierarchy, whose extensions are in the extension list provided as arguments to the program. Your program should print the whole pathnames of the found files. Synopsis: findExt <extension-list> [-t target-directory] When target-directory is missing, the working directory (./) will be the target directory Some sample runs: $ findExt txt pdf That is, find all files whose extensions are either txt or pdf in the directory hierarchy ./ $ findExt jpg -t $HOME //target directory is home directory That is, find all files whose extensions is jpg in the directory hierarchy $HOME Requirement: - You must use the system call nftw() that allows you to walk across a file tree. This system call will do all the recursive walk and each time it visits a file or a directory, it will call your own function (a function that you pass as a parameter).in c++ A frequency table lists words and the number of times each word appears in a text file.Write a program that creates a frequency table for a file whose name is entered by theuser. You can use a map of string-int pairs. You may want to use the C library functionispunct() (in header file CTYPE.H) to check for punctuation so you can strip it off theend of a word, using the string member function substr(). Also, the tolower() functionmay prove handy for uncapitalizing words.In C Programming: Write a function printCourseRow() which receives a course pointer and prints all its fields as a single row. Use proper formatting so that when we print 2 or more courses as rows, the same members align below each other. Test the function, but don’t include the testing code in your homework.Upload a screenshot of a sample output.
- Computer Science Write a C++ code where the user is able to enter their name, symptom of sickness, and appointment time to be stored into a file and print it out. After that use a do while loop to write a linked list program in C++ with the following function for that file: press 1 Add symptoms press 2 Print the Patients ID press 3 Change Appointment Time press 4 Delete Patient press 5 Search the list for a given Patient press 0 to end the program The user should be able to change anything of the persons file that does not change the others. The code should also sort the patients in order by appointment times.Implement in C Programming 9.10.1: LAB: Movie show time display Write a program that reads movie data from a CSV (comma separated values) file and output the data in a formatted table. The program first reads the name of the CSV file from the user. The program then reads the CSV file and outputs the contents according to the following requirements: Each row contains the title, rating, and all showtimes of a unique movie. A space is placed before and after each vertical separator ('|') in each row. Column 1 displays the movie titles and is left justified with a minimum of 44 characters. If the movie title has more than 44 characters, output the first 44 characters only. Column 2 displays the movie ratings and is right justified with a minimum of 5 characters. Column 3 displays all the showtimes of the same movie, separated by a space. Each row of the CSV file contains the showtime, title, and rating of a movie. Assume data of the same movie are grouped in consecutive rows. Hints: Use…using c++ In this assignment you are going to implement your own version of university library system,Thesystem will have two different sides , the first one is to help the librarian to do his job and the other side for admin to manage every one permissions in the system , so You should provide the following features in your system: Admin view o Add/remove Studentso Add/remove librarian o Add/remove other admins Librarian viewo Add/Delete bookso Issue/Return bookso View bookso View Issued bookso Log in /log outo Search for the book(id/name) Simple backend for your system , You could use a file each row should represent itemo Books File should be something like:Id , Book Name, Author Name, Available quantity, Issued Quantity1,Oliver Twist, Charles Dickens,98,2In the previous the first row was the name of each column , you can do that or handle it in your code , id =1 , Book Name =Oliver Twist ..Etc. Tables neededo Books Id Book Name Author Name Available quantity Issued…
- Python decorators can be used in Django in order to avoid duplication of code in view functions. For instance, consider the following definition of a decorator that is then applied to a view function. This code has three bugs: 01: def fetch_author (view_func) : 02: 03: 04: 05: 06: 07: 08: def wrapper (request, *args, **kwargs) : return view_func 09: 10: @fetch_author 11: def books_new (request) : 12: 13: 14: 15: 16: 17: } books = Book.objects.filter (authors _in= [author], year_ _gte="2015") context = { try: author = Author.objects.get (id-request. GET ["author_id"]) view_func (request, author, *args, **kwargs) except Author. Does NotExist: return bad_request (request, Author.DoesNotExist) Line 02 Line 05 Line 08 return render (request, "books-recent.html", context) Line 11 Identify the three lines which contain the three bugs: Line 12 Line 17 "title" : "New books", "books" books,#The Iris Dataset import sklearn.datasetsimport matplotlib.pyplot as plt import numpy as np import scipy iris = sklearn.datasets.load_iris() Write a function that takes in an index i and prints out a verbose desciption of the species and measurements for data point i. For example:Data point 5 is of the species setosaIts sepal length (cm) is 5.4Its sepal width (cm) is 3.9Its petal length (cm) is 1.7Its petal width (cm) is 0.4Hashing Project in Python to Extract Features of Names You are given the following three functions. They take plain text names and covert then into features vefctors so that you can work with them in a classification system. Let's check your understanding of Python function. Add notes to each line describing what is happening in these functions. FUNCTION ONE: def hashfeatures(baby, B, FIX): """ Input: baby : a string representing the baby's name to be hashed B: the number of dimensions to be in the feature vector FIX: the number of chunks to extract and hash from each string Output: v: a feature vector representing the input string """ v = np.zeros(B) for m in range(FIX): featurestring = "prefix" + baby[:m] v[hash(featurestring) % B] = 1 featurestring = "suffix" + baby[-1*m:] v[hash(featurestring) % B] = 1 return v FUNCTION TWO: def name2features(filename, B=128, FIX=3, LoadFile=True): """ Output: X : n feature…
- 3. lookup_friends_heights This function takes a friends database (a list of dictionaries, like the previous functions) and a list of friends names, and it returns a list of heights for the specified friends. If a given friend's name is not present in the friends database, we put a None in the corresponding slot. We assume that there will be at most one friend with a given name in the list. You may want to use nested for-loops for this function. Sample calls should look like this. >>> lookup_friends_heights([{"name":"todd","height":170},{"name": "sarah", "height":165},{"name":"dweezil", "height":175}], ["dweezil", "sarah"]) [175, 165] >>> lookup_friends_heights([{"name": "todd","height":170},{"name": "sarah","height":165},{"name": "dweezil", "height":175}], %3D ["sarah", "elíza", "dweezil"]) [165, None, 175]3. lookup_friends_heights This function takes a friends database (a list of dictionaries, like the previous functions) and a list of friends names, and it returns a list of heights for the specified friends. If a given friend's name is not present in the friends database, we put a None in the corresponding slot. We assume that there will be at most one friend with a given name in the list. You may want to use nested for-loops for this function. Sample calls should look like this. >>> lookup_friends_heights([{"name":"todd","height":170},{"name": "sarah","height":165},{"name":"dweezil","height":175}], ["dweezil", "sarah"]) [175, 165] >>> lookup_friends_heights([{"name": "todd","height":170},{"name": "sarah","height":165},{"name": "dweezil", "height":175}], ["sarah", "elíza", "dweezil"]) [165, None, 175]3. lookup_friends_heights This function takes a friends database (a list of dictionaries, like the previous functions) and a list of friends names, and it returns a list of heights for the specified friends. If a given friend's name is not present in the friends database, we put a None in the corresponding slot. We assume that there will be at most one friend with a given name in the list. You may want to use nested for-loops for this function. Sample calls should look like this. >>» lookup_friends_heights([{"name":"todd", "height":170},{"name":"sarah","height":165}, {"name":"dweezil","height":175}], ["dweezil", "sarah"]) [175, 165] >>> lookup_friends_heightsC[{"name":"todd","height":170},{"name":"sarah","height":165}, {"name":"dweezil","height":175}], ["sarah", "eliza", "dweezil"]) [165, None, 175] 4. class definition for Friend For the next version of the friends database (coming soon!), we want to use classes rather than dictionaries. Define a Friend class , where each Friend object…