Write a program that replaces each line of a file with its reverse. For example, if you run java Reverse HelloPrinter.java then the contents of HelloPrinter.java are changed to retnirPolleH ssalc cilbup { )sgra ][gnirtS(niam diov citats cilbup { wodniw elosnoc eht ni gniteerg a yalpsiD //
Q: ncoding technique solves the loss of synchronization because of long 0’s and 1’s? A. Manchester B....
A: given - Which encoding technique solves the loss of synchronization because of long 0’s and 1’s?
Q: Explain REST and state the protocol that REST used for communication
A: A protocol is set of rules and regulations which governs during working of system.
Q: 1. Why lower bound is important?
A: As per our policy, "Since you have asked multiple questions, we will solve the first question for yo...
Q: Type the program's output Input 6 4 target = int(input()) n = int(input()) while n <= target: ...
A: Type the program's output Input 6 4 target = int(input()) n = int(input()) while n <= target: pri...
Q: Consider an array arT = {12, 14, 17,18, 23, 24, 28, 33, 43}. Show using diagram how element 12 can b...
A:
Q: Write program to enter and draw, as a CT signal, the following two sequences: A-[3, 6, 9, 12) and B-...
A: I'm providing the answer of the above question with the program & figure. I hope this will be he...
Q: PIC18F87J11 Do the following: a) Copy data 0xA to data memory location 0x400 b) Toggle the value in...
A: SUMMARY: - Hence, we discussed all the points.
Q: Print your complete 8-digit student ID on common-anode 7-segment displays. The 8-digit ID should be ...
A: ANSWER: -Polling the arduino pins high and low severally for displaying numbers on 7-segment isn't a...
Q: Please answer it in Python Write a function colonne polygone(nb poly dimension) that draws nb poly p...
A: the answer is given below:-
Q: r friends has invented a new game called Pillar Jumpers. In this ga ghts are placed next to each oth...
A:
Q: Why does merge sort only do 7 comparsions if the array is sorted? Can show the working?
A: Merge sort is a divide-and-conquer sorting algorithm. It divides the array into two equal halves rec...
Q: Unsatisficing models are those that discover a satisfactory solution to a problem, but not always th...
A: Answer: False Explaination: To solve a problem or accomplish a goal, virtual teams bring together ex...
Q: Create a SQL statement that will replace all entries in the SupplierID property of the Products tabl...
A: Introduction: A SQL statement is a collection of instructions that includes identifiers, parameters,...
Q: Provide an example of a qualitative data analysis. The example should be within the healthcare domai...
A: answer is
Q: I want you to make a array of numbers for me. All you have to do is make a program that will let me ...
A: In this question, we are asked to write a C program where user enter the size and elements of the ar...
Q: With the help of a master's thesis REAL-TIME ROAD TRAFFIC EVENTS DETECTION AND GEO-PARSING Please an...
A: a) In the 21st century, the number of cars on the road is increasing asand limited road infrastructu...
Q: Change the current date format to: MON-DD-YYYY HH:MI:SS for your session ? Hint: use ALETER SESSION
A: Date is always stores in default way only but it can be converted into our required format of the da...
Q: describe 2 advantages of using higher level socket compared to lower level of the network stack
A: advantages of using higher level socket compared to lower level of the network stack
Q: Discuss the exact algorithm for Subset sum problem
A: Here is the detailed explanation of the algorithm.
Q: Explain what is Civil liberties in Social and professional issues in computer Science.
A: answer is
Q: List and explain Four examples each of probabilistic and non- propabilistic sampling technically
A: INTRODUCTION: In the given problem statement, we are asked about the probabilistic and non- probabil...
Q: Assign a name to the graphics processing unit.
A: Introduction: A graphics processing unit -GPU is a computer processor specifically designed to handl...
Q: 1. Why is packet switching efficient? Explain your response. 2. Compare implicit allow and implicit...
A: Packet Switching Packet Switching is a method of transferring data in the form of packet. Packet sw...
Q: Computer Science Suppose you are working as developer to write a programming codes within a team, yo...
A: Find the code with explanation and output:
Q: Causes of Civil liberties in Social and professional issues in computer Science.
A: Ethical Dilemmas for Computer UsersSome of these dilemmas are new (such as copying software), while ...
Q: What is the effect of ROLLBACK if you give it immediately after a COMMIT?
A: Effect of ROLLBACK after COMMIT
Q: 1 Which of the following is the best description of a SAN (Storage Area Network)? It normally uses t...
A: I'm providing the correct option with proper explanation. You can understand easily. I hope this wi...
Q: 6-3 minutes) Assume that we have the increaseAge function defined be ve call increaseAge (a); Why is...
A: Given :
Q: The following pseudocode works, but it performs a case-sensitive validation of the user’s input. How...
A: the answer is given below:-
Q: The 2s complement of 623 is: None of them O 01110010001 10010010001 O 10110010001 The Equivalent in ...
A: As given, we need to find out - The 2's complement of decimal number 623 and The equivalent binary n...
Q: g) The smallest unit of binary data is the 1. bit. 2. byte. 3. word. h) Which of the following best ...
A: *Note: We have given guiding principle, we can only do first question according guideline. So please...
Q: convert 2657 base 8 to base 2 convert 2101 base 4 to base 16 convert 725 base 8 to base 4
A: Here in this question we have given some number in some base and we have asked to convert it into ot...
Q: Write 3 Non-Functional Requirements for Moodle when taking a Quiz
A: Non functional requirements tells how a system works.
Q: s the message box that was triggered instantly appear before or after the applicati
A: CreateWindow functionThis function creates a pop-up or child window that is overlapped. It provides ...
Q: ecution for each line using "call by need" an
A: Draw the run-time stack after the execution for each line using "call by need" and "call by name". A...
Q: Q3 (6%). Let x = [æ1, x2, x3] and y =+ log, 22 – . Calculate the fo * at x = [9,1, ): Hint: the answ...
A: 1.
Q: (2) Algorithm f(n) if n==1 return 1; return 2*f(n-1)+ n*n*n;
A: The solution to the given problem is below.
Q: Who or what is the Virtual Key Symbol for the Left Menu on the computer?
A: Virtual key: Virtual keys are keys that are not physically present on the keyboard but are mapping t...
Q: ibonacci number pattern that involves square roots. Both sides of the equation should be equal and o...
A: We create a function Fibonacci() that takes an integer parameter ‘n’ and returns the nth term of the...
Q: Question 3: Complete a Simulation table for checkout counter using the Event Scheduling/ Time Advanc...
A: To advance the clock time, a simulation table is being used and with that, a new snapshot of systems...
Q: 5.a. A link with an optical budget of 8 dB has a remaining margin of 3 dB. What's the total loss in ...
A: According to the information given:- We have to choose the correct option to satisfy the statement.
Q: Given the two binary numbers, 1011000 (base 2) and 1100 (base 2). What is the product in decimal for...
A: The solution to the given problem is below.
Q: Given set A = {1, 3, 4, 5, 7} and set B = {2, 6, 8, 10}. Find the product of the cardinality of both...
A: Cartesian product of two sets A and B = A X B = {(a, b) | a € A and b € B) } Since, A = {1, 3, 4, 5,...
Q: Define the concept of a unified memory architecture.
A: The goal of unified memory is to reduce data redundancy by copying data between separate areas of me...
Q: Explain what happens at the client when a DNS server returns multiple IP addresses for a given query...
A: When a DNS server returns IP addresses for a query, it often returns multiple IP addresses. When thi...
Q: Given a directed graph G=(V, E), design an algorithm to find out whether there is a route between tw...
A: DFS Pseudo code DFS (V,E) for each vertex u in V[G] do color[v] ← GRAY π[v] ← NIL // predecessor o...
Q: What is the minimum number of states required in any DFA to accept the regular language L = {All bin...
A: Solution:
Q: Write an application that prompts the user for two integers and then prompts the user to enter an op...
A: Here is the program screenshot in java:
Q: Topic: Application in AI 1-Pick one application in AI that you interested and elaborate it. for exam...
A: The capacity of artificial intelligence to reason and execute actions that have the highest possibil...
Q: Consider an array arr = element 12 can be searched from the aray using Binary Search. Also calculate...
A: Binary search is an algorithm which uses divide and conquer algorithm. It divides the array into par...
Step by step
Solved in 3 steps with 4 images
- Write a program that reads a text file and creates an alphabetical index of words and in which lines of this original example. The file name is given as an argument to main (). Ignore the small-capital (all lowercase: k,l,p) and punctuation. Solve with ternary tree using the TST.java class (https://algs4.cs.princeton.edu/52trie/TST.java.html). An execution snapshot is then given. For the file: It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness It will appear Index of file: exercise.txt age 3-4 best 1 foolishness 4 it 1-2-3-4 of 1-2-3-4 the 1-2-3-4 times 1-2 was 1-2-3-4 wisdom 3 worst 2Java 1. Need a list of 30 words, phrases and company names commonly found in phishing messages. Assign point value to each based on your estimate of its likelihood to be in a phishing message (e.g., one point if it's something likely, two points if modereratly, or three points if highly likely). Do an application that scans a file of text for these terms and phrases. For each occurance of a keyword or phrase within the text file, add the assigned point value to the total points for the number of occurences and the point total. Show the point total for the entire message. 3. Do a word file answering these questions:Does your program assign a high point total to some actual phishing e-mails you have received? Does it assign a high point total to some legitimate e-mails you have received?Solve the following for an input.txt file containing the following: "1 2 3 4" #include <stdio.h>#include <stdlib.h>void end_now();char *next_input(); int hash = 8765309;int INPUTS[4]; void phase03(){ // TODO: put numbers in input.txt to pass the code below int a = atoi(next_input()); int b = atoi(next_input()); int c = atoi(next_input()); int d = atoi(next_input()); int targ = 0; targ |= 1 << (hash % 13); targ = targ << (hash % 3); targ |= 1 << (hash % 19); targ = targ << (hash % 5); targ |= 1 << (hash % 31); targ = targ << (hash % 7); int shot = 0; shot |= 1 << a; shot |= 1 << b; shot |= 1 << c; shot |= 1 << d; int hit = shot ^ targ; hit = !hit; if(hit){ printf("Right on target: nice shootin' bitslinger!\n"); return; } printf("Shifty bits hit? Xor not it seems...\n"); end_now();} ////////////////////////////////////////////////////////////////////////////////// additional code to…
- #program should be written in python with comments. Write a program that uses a dictionary to assign “codes” to each letter of the alphabet. For example:codes = { ‘A’ : ‘%’, ‘a’ : ‘9’, ‘B’ : ‘@’, ‘b’ : ‘#’, etc . . .}Using this example, the letter A would be assigned the symbol %, the letter a would be assigned the number 9, the letter B would be assigned the symbol @, and so forth. The program should open a specified text file, read its contents, then use the dictionary to write an encrypted version of the file’s contents to a second file. Each character in the second file should contain the code for the corresponding character in the first file. Write a second program that opens an encrypted file and displays its decrypted contents on the screen.Java Program ASAP Here is a FileSorting program to read a CSV file, sorts a list of integers on each row, and prints a comma separated list of sorted integers on the console. Modify ir by removing or changing the main method os it passes all the test cases. import java.io.File;import java.io.FileNotFoundException;import java.util.ArrayList;import java.util.Scanner; public class FileSorting { private static final String FILENAME = "somefile.txt"; public static void main(String[] args) { // read integers from input file Scanner fileReader; ArrayList<Integer> numbers = new ArrayList<>(); try { fileReader = new Scanner(new File(FILENAME)); while(fileReader.hasNextLine()) { numbers.add(Integer.parseInt(fileReader.nextLine().trim())); } fileReader.close(); }catch(FileNotFoundException fnfe){ System.out.println("File " + FILENAME + " is not…write program code in java: Write a program that reads two files “Data1.txt”, “Data2.txt”; Then add their corresponding elements and produce an output file “output.txt”. If the number of elements are not equal, fill the elements of the smaller file up with “0” s. Sample output: Elements of the “Data1.txt”: 3 5 7 8 9 Elements of the “Data2.txt”: 45 11 Elements of the “Output.txt”: 48 16 7 8
- Create a file named minesweeper.pyCreate a function that takes a grid of # and -, where each hash (#) represents amine and each dash (-) represents a mine-free spot.Return a grid, where each dash is replaced by a digit, indicating the number ofmines immediately adjacent to the spot i.e. (horizontally, vertically, anddiagonally).Example of an input:[ ["-", "-", "-", "#", "#"],["-", "#", "-", "-", "-"],["-", "-", "#", "-", "-"],["-", "#", "#", "-", "-"],["-", "-", "-", "-", "-"] ]Example of the expected output:[ ["1", "1", "2", "#", "#"],["1", "#", "3", "3", "2"],["2", "4", "#", "2", "0"],["1", "#", "#", "2", "0"],["1", "2", "2", "1", "0"] ]Write a function in python named "write_anagrams", that accepts a dictionary of anagrams and a filename. Write each set of anagrams out to a record in a CSV file with the specified name. The first word on each line should be the sorted word, followed by a count of the of the anagrams that include the same characters, e.g.: key,anagram_1,[anagram_2, ...] For example, there are 6 different words in words.txt that are anagrams for the key "aet": aet,aet,ate,eat,eta,tae,tea If any errors occur, print a detailed error message without crashing.Please help me code in java: Write a program that reads two files “Data1.txt”, “Data2.txt”; adding their corresponding elements produces an output file “output.txt”. If the number of elements are not equal, fill the elements of the smaller file up with “0” s. Sample output: Elements of the “Data1.txt”: 3 5 7 8 9 Elements of the “Data2.txt”: 45 11 Elements of the “Output.txt”: 48 16 7 8
- Suppose you have Java source files under the directorieschapter1, chapter2, . . . , chapter34. Write a program to remove the statement package chapteri; in the first line for each Java source file underthe directory chapteri. Suppose chapter1, chapter2,. . . , chapter34are under the root directory srcRootDirectory.The root directoryandchapteridirectory may contain other folders and files. Use the followingcommand to run the program:java Exercise12_20 srcRootDirectoryWrite a function in python named "read_words" that declares a parameter for a filename and returns a collection of unique words in the file. Even though words.txt contains a single word per line, you should not assume that this is true of every file. For example, if the line is a sentence, you should split the line into individual words before storing each word in your collection. Handle any errors that occur by printing a detailed error message. Hint: the Python set works like Java's HashSet.jave programming Suppose a Student class has the following attributesand methods: Student: int id (public), String name(public), double physicsMarks(private), doublechemistryMarks(private), double mathMarks (private),double totalMarks(public) Student(int id, String name, double physics_marks,double chemistry_marks){Assign the variables;} Now, you have to take input from a file named “input.txt”.In the first line of the file, there willbe the total number of students n. After that, therewill be n more lines, each linecontaining a student’s id, name, physicsMarks,chemistryMarksand mathMarks. Youhave to read each student’s information, create studentobjects using these information andstore the student objects in anArrayList. Use BufferedReaderto do this job. Print each student’s information sorted by the descendingorder of total_marks in an “Output.txt''file. Use the Comparator class to sort the ArrayList. Sample input.txt file: 334 rahim 100 20 40 44 karim 50 50 50 12 azim 100 100 55…