What is the XPath expression to find the price of the disc called "Amer" in the XML segment below: Let Me In 9.99 1 Amer 12.99 1 O A. //item/[title="Amer"]/../price O B. /item/price[title="Amer"] Oc. /item/title='Amer"/price O D. //item[title="Amer"]/price
Q: Write the ternary-searchtrie (TST)thatrepresents a dictionary of the strings: “gnu”…
A: Unlike trie(standard) data structure where each node contains 26 pointers for its children, each…
Q: e Write a program that produces a Caesar cipher of a given message string. A Caesar cipher, or…
A:
Q: Create a two-string activity, $ a and $ b. Repeat times when two strings contain the same two…
A: Algorithm: Start Implement a function named strMatchBy2char() that takes two strings $a and $b If…
Q: Write an XML code that displays the following output when executed in an emulator or real device
A: Approach:The View objects are usually called "widgets" and can be one of many subclasses, such as…
Q: Write a java program that stores, retrieves, adds, updates and search addresses as shown in gure.…
A: Actually, java is a object oriented programming language. It is a platform independent.
Q: Provide a complete explaination about this source code below: #include using namespace std; string…
A: Basic elements of a program: Header files : These are files which conation basic function to be…
Q: Develop a WCF-REST Web service that takes a string (without spaces) as a parameter and performs…
A: Two ways: Treat the number as a string so every digit is a char in the string. Use mod operation to…
Q: Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing…
A: Sliding means returning a part of list. Here in option b, list[:-2] means return the entire list…
Q: PYTHON • Make a function str_hashtag() that replaces the 1", 2nd, 3rd, 4", and 5" character in 5…
A: Python code for above : # required function def str_hashtag(words): j = 0 # replace…
Q: How to write a Pseudocode for this project? Project 1: Caesar Cipher Assignment Overview In this…
A: Code: def enc(): text,s=input("Enter the string to be encoded: "),int(input("Enter the shift…
Q: Write a function that retrieves the top 3 longest words of a newspaper headline and transforms them…
A: function getHashTags(str) { let finalArr = []; let strArr = str .split(' ') .sort((a, b)…
Q: MessageSecurity
A: public class Crypto{ //While an app specific salt is not the best practice for //password…
Q: What will be the two lines displayed after executing the following code? def pair(e,f): ka=e-f api()…
A: The functions in python are defined using the def keyword. The statements in these functions must be…
Q: Create a function that takes the dimensions of two triangles (like the same members) and checks if…
A: Step 1 : Start Step 2 : Define a function doTriangleFit() to check if the first triangle fits in the…
Q: For the input line:29 88.7 CSC103 What will be in the variables after executing the following C++…
A:
Q: Consider you are given a very specialized string with a unique format as: Quiz_(no) # (q.no) :…
A: Algorithm: Start Read a string If the string is in required format split the with delimiter \n and…
Q: ming the string. The i-th update transforms the string Si-1 into Si, and hence after all the U…
A: Below is the detailed and simplified python code for the given problem statement:
Q: Many companies use telephone numbers like 555-GET-FOOD so the number is easier for their customers…
A: phoneNumber=input().upper(); #convert the input to upper case originalPhoneNumber="";…
Q: Write down the algorithm (not code) to search a string in a BST?
A: A Binary Search Tree is a type of binary tree where the elements are sorted The sorting is done in…
Q: Write a program that reads the user's first name and last name, and then use them to create a UPM…
A: NOTE : AS THE QUESTION IS NOT SPECIFIC ABOUT THE PROGRAMMING LANGUAGE TO BE USED , SO PYTHON HAS…
Q: Done in Perl. Showing process would be nice. Write a program to accept in an HTML string. search…
A: if(T) { wierdurl<-vector() wierdurl[1]<-"https:// "…
Q: Write a program that reads through the 'quotes.txt' file (downloadable from the following link) one…
A: I have used Jupyter Notebook to impement in Python, added comments for better understanding: f =…
Q: Write a C program based on the following code: int p[2]; char *argv[2]; argv[0] = "wc"; argv[1]…
A: int p[2];char *argv[2]; argv[0] = "wc"; argv[1] = 0;pipe(p);if(fork() == 0) { close(0);…
Q: Done in Perl. Someone gave the wrong answer. Write a Perl program to accept in an HTML string. Be…
A: See the solution below-
Q: Build a DFA that accepts the set of string over {1,2,3} the sum of digits is divisible by five. For…
A: first lets understand the logic to build this DFA: -since sum of digits must be divisible by 5,…
Q: Finish the exercise Write a script SB_temp_fscanf.m which read file “monthly_temp_SB.txt" by using…
A: clear clc f=fopen('monthly_temp_SB.txt','r'); header=fscanf(f,' %s ',5); data=zeros(12,5); for…
Q: Here is the WordNet entry for ”sentence”: Noun 1. S: (n) sentence (a string of words satisfying the…
A: The answer is as follows
Q: Suppose that s1, s2, s3, and s4 are four strings, given as follows:s1 = "Welcome to Python"s2 = s1s3…
A: The results of the following expressions are given below:
Q: MIME supports multiple representations of the same content using the multipart/alternative syntax;…
A:
Q: Write a pyspark program to replace a character with other character from a string in Intelij IDE Do…
A: The above question is solved in step 2 :-
Q: You are looking at an old script you wrote and see this line: if [ -x /bin/ps -a -f /etc/app.conf ]…
A: I have provided solution in step2
Q: Write a program in elixir to iterate over the list of strings and divide the whole list into smaller…
A: Here we write simple , divide the whole lists into smaller chunks. we assume as take 16 element in…
Q: For this function, you must build a string that when printed, // will output the entire binary…
A: Task : Given the function declaration. The task is to complete the implementation of the function.
Q: Which of the following is an invalid Python variable name? a) try b) _99 c) list d) nine_099 e)…
A: A variable name can't be same of keywords present in programming language.
Q: Which Java statement creates array of strings from String s1 by separating parts using the separator…
A: In Java, split() method breaks a given string on the basis of given expression. Syntax:…
Q: alphabet = "abcdefghijklmnopqrstuvwxyzæøå ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅ " l= len(alphabet) def…
A: PLEASE DO SUPPORT FOR MY EFFORTS, THANKS!ANSWER:alphabet = "abcdefghijklmnopqrstuvwxyzæøå…
Q: By using NetBeans IDE, write the html program of following output.
A: *HTML Code for the following layout:-- <!DOCTYPE html> <html lang="en">…
Q: What is the output of this program? prim_colors = ["red", "blue", "yellow" ] [x if x != "yellow"…
A: for the question 1 we can simply solve the given 1 line expression into the multiple lines we can…
Q: Consider the String below: String r = "a subaru"; Which of the following will create the String r1…
A: The replace() method searches a string for a specified character, and returns a new string where the…
Q: Write a JavaScript function that would accept a string and checks whether a passed string is…
A: Palindrome String remain the same whether written forwards or backwards. EXAMPLE : LEVEL
Q: download; restadata.txt : https://dosyam.org/2D1j/restdata.txt restaurant.c…
A: It is defined as a powerful general-purpose programming language. It can be used to develop software…
Q: Write the python program using only the import CSV to display the following: Count and display the…
A: Here is the Code import csv import sys f = open('countrycities.csv') csvread = csv.reader(f) h = []…
Q: Consider you are given a very specialized string with a unique format as: Quiz_(no) # (q.no) :…
A: Algorithm: Start Read a string Split the string with '\n" as delimiter and store the result in an…
Q: in bash shell scripting Write a regular expression that matches a comma separated list of 4 strings…
A: In this program we have to write a bash script which have a array of list as the elements. Taking…
Q: In this HW, we are validating the user name and password entered by the user. If the user name and…
A: Index.html <formaction="servlet1"method="post">…
Q: Write a PHP function that checks whether a passed string is a palindrome or not? A palindrome is a…
A: A palindrome is a word, phrase, or sequence that reads the same backward as forward
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Lab 14: Processing a json file Read in a JSON file such as the following: { "students":[ } { }, { "firstName" "lastName : "Doe", "major" : "CENT", "credits": 12, : "Jane", "exams" : [92.7, 91.4, 95.2] "firstName" : "John" "lastName' : "Doe" "major": "PHYS", "credits" : 10.0, "exams : [91.1, 81.3, 85.6] "firstName" : "Bill", "lastName : "Gates", "major": "ICS", "credits" : 7, exams" : [98.7, 94.4, 96.4] PART 1: Parse the JSON data into a dictionary and output the data as follows: Jane Doe is majoring in CENT John Doe is majoring in PHYS Bill Gates is majoring in ICSdef wear_a_jacket(us_zip:str) -> bool: This function should use https://openweathermap.org/ API (user account required) to collect its weather information. The purpose of this function is to inform you if you should wear a jacket or not. It will be given a US zip code. This function should query the API to figure out the current temperature in the region associated with the US zip code. If the temperature is less than 60 degrees Fahrenheit (main.feels_like float: This function should use https://openweathermap.org/ API (user account required) to collect its weather information. This function should retrieve the historical temperature in Fahrenheit at a particular US location. You will be given a number of days, hours, and minutes and a United States zip code. The time values given are the cumulative total time in the past minus the current time, you should retrieve the historical temperature (current.temp). In other words, if the parameter days is 4 hours is 0 and minutes is 5.…mysql> DESC bookauthor; mysql> DESC author; mysql> DESC book; | Field | Туре | Field | Туре | Field Тур | int(11 | varchai author_order | int(11 royaltyshare | decima: author_id isbn | author_id | int(1: | ssn lastname | firstname | varch: | phone | address | city | state | zip | varch: | varch: isbn var I name | type pub_id I price | advance I ytd_sales I pubdate var var | varch: | varch: | varch: | varch: | varch: | int dec | dec int mysql> DESC bookeditor; | dat | Field | Туре mysql> DESC editor; mysql> DESC publisher; editor_id | int(11) | varchar(1 | Field isbn | Field | Туре editor_id ssn pub_id | int(11) | varchar(40) varchar(40) varchar(20) varchar(2) lastname name firstname address | phone editor_position salary | city state
- Consider the following XML file (which is located in some file called mydoc.xml): title author book hardcover book ebook title edition title products author film format format title medium, variant price How many elements will be in the output of the following query? (pick the range containing that number) let $doc:= doc("mydoc.xml") for $item in $doc/products/* for $title in $doc/products/"//title return {$item].[$title]Follow these instructions:● Create a python program called taskXML.py. Write the code to:○ Read in the movie.xml file.○ Read about the iter() and itertext() function here. Use the iter()function to list all the child tags of the movie element.○ Use the itertext() function to print out the movie descriptions.○ Find the number of movies that are favourites and the number ofmovies that are not.def read_flights(flights_source: TextIO, routes: RouteDict) -> FlightDir: """Return the flights from flights_source, including only the ones that have an entry in routes. >>> from io import StringIO >>> flight_src = StringIO(TEST_FLIGHTS_SRC) >>> actual = read_flights(flight_src, TEST_ROUTES_DICT_FOUR_CITIES) >>> actual == TEST_FLIGHTS_DIR_FOUR_CITIES True """ flights = [] src_index = FLIGHT_DATA_INDEXES["Source airport"] dst_index = FLIGHT_DATA_INDEXES["Destination airport"] # Complete this function. for line in routes_source:
- computer engineering question Please code in the Node js to split the string into the readable format. Use the built in modules to easily split the query. Split the query string into readable parts the address: - http://localhost:8080/?year=2017&month=July Output: - 2017 JulyIn C#: Create a function that takes in one argument: The url to an API endpoint. The function should make the API call and pull the data in, convert it to a dictionary, and pull out the number of kills from the last 7 games the user played. The function should return the sum of the top five number of kills from these games. Call Of Duty API: https://rapidapi.com/elreco/api/call-of-duty-modern-warfareAttached File: a2provided: grades = [[71, 14, 41, 87, 49, 93],[66, 73, 54, 55, 94, 79],[20, 51, 77, 20, 86, 15],[79, 63, 72, 57, 63, 73],[30, 66, 78, 65, 41, 45],[11, 83, 51, 47, 68, 63],[99, 43, 85, 86, 24, 75],[67, 102, 11, 84, 64, 109],[16, 24, 101, 78, 55, 89],[100, 26, 37, 95, 106, 100],[55, 77, 30, 34, 28, 15],[87, 67, 13, 71, 67, 83],[95, 65, 94, 56, 15, 92],[102, 23, 36, 39, 60, 39],[90, 59, 96, 105, 83, 16],[101, 40, 17, 12, 44, 36],[39, 63, 96, 12, 65, 82],[95, 20, 105, 34, 69, 95],[95, 93, 75, 18, 105, 102],[35, 15, 82, 106, 73, 30],[80, 52, 67, 49, 11, 88],[86, 17, 44, 75, 78, 49],[22, 60, 74, 110, 92, 37],[13, 14, 15, 82, 75, 57],[71, 106, 15, 77, 30, 98],[43, 80, 76, 85, 102, 53],[26, 98, 60, 80, 104, 79],[12, 28, 40, 106, 88, 84],[82, 75, 101, 29, 51, 75],[20, 31, 84, 35, 19, 85],[84, 63, 56, 101, 83, 102],[25, 106, 36, 24, 61, 80],[86, 75, 89, 47, 28, 27],[38, 48, 22, 72, 53, 83],[70, 34, 46, 86, 32, 58],[83, 59, 38, 16, 94, 104],[62, 110, 13, 12, 13, 83],[90, 59, 55,…
- Create a new file cart.html You must get and set the data on the web page by using document.getElementById( ). Each HTML element on the web page already has an id so it is easy. No need for a loop to go through the list of products, there is only 2 products and the info is hard coded on the web page. You must write the code for function cartTotal().Examine the following code. function getData() { var url = "ajaxdata/citStudents.txt"; var request = new XMLHttpRequest(); request.open("GET", url); request.onreadystatechange = function() { if (request.readyState == 4 && request.status == 200) { alert(request.responseText); } }; request.send(null); } What does it mean if the condition (request.readyState == 4 && request.status == 200) evaluates as true? it means there were no http errors and that the data has been returned to the browser. it means there were was an HTTP error and that the data will not be returned to the browser. it means the request has been sent and data will be back in 200 milliseconds or less.Suppose that you have a database table called Books: ВОOKS ISBN Author Title Price • write PHP code that reads titles of all books in the book table, display names in HTML list. • After user selects an item from the list you created above. Making use of prepared statement and binding variables do the following: given the book title, returns the quantity and display numbers in HTML dropdown list starting from 1 to quantity of that book(based on what is in the DB). For example if quantity is 5, the drop down list shows 1, 2, 3, 4, 5