Computers And Technology College
Answers
Answer 1
myHostname = window.location.hostname;
var myTLD = "." + myHostname.substring(myHostname.indexOf("wupload") + "wupload.".length).split(".")[0];
function afterLoad() {
return
}
ieFixForFileSelectionOnChangeEventTimer = null;
function ieFixForFileSelectionOnChangeEvent(a) {
$("#siteName").toggle();
if ($("#inputFileSelection").val() == "") {
ieFixForFileSelectionOnChangeEventTimer = setTimeout("ieFixForFileSelectionOnChangeEvent()", 200)
} else {
$("body")[0].focus()
}
}
function urlencode(a) {
return escape(a.toString().replace(/%/g, "%25").replace(/\+/g, "%2B")).replace(/%25/g, "%")
}
$(document).ajaxStart(function() {
$("body").addClass("ajaxLoading")
});
$(document).ajaxStop(function() {
$("body").removeClass("ajaxLoading")
});
$(document).ajaxError(function(d, c, a, b) {
CMApplication.Widgets.Dialog.close();
CMApplication.Widgets.Dialog.displayMessage(c.responseText, CMApplication.Widgets.Dialog.Types.exception)
});
jQuery.setCookie = function(b, c, a) {
var d = new Date();
d.setDate(d.getDate() + a);
cookieDomain = ".wupload" + myTLD;
document.cookie = b + "=" + escape(c) + ((a == null) ? "" : ";expires=" + d.toUTCString() + "; path=/;domain=" + cookieDomain + ";")
};
jQuery.getCookie = function(a)
Related Questions
Semantic search engines use NLP, contextual cues, synonyms, word variations, concept matching, specialized queries, and other strategies to create search results that are superior to those created by simple keyword-matching algorithms. a,. True
b. False
Answers
Answer:
It is TRUE that "Semantic search engines use NLP, contextual cues, synonyms, word variations, concept matching, specialized queries, and other strategies to create search results that are superior to those created by simple keyword-matching algorithms. "
Explanation:
Semantic search engine use NLP (natural language processing).
Natural Language Processing(NLP): is a branch of artificial intelligence that deals with the interaction between computers and humans using the natural language.
Your are a project manager. Certain members in your team have been arguing about which software to use in the project. You conduct a meeting to resolve the conflict by focusing on members' common point of views.What technique of conflict management is this ?
Answers
Answer:
Smoothing conflict resolution
Explanation:
Conflict resolution is an way for two or more parties to find a peaceful solution to disagreement among them through methods like negotiation to resolve the disagreement
Smoothing conflict resolution is method used to emphasizes the common point of view ,accommodating the point of view of other people first rather than one's point of views. It helps to protect more important interests while giving up on lesser one
Answer:
Smoothing conflict resolution
Explanation:
Smoothing (also known as accomodating). Smoothing emphasizes the common interests of the conflicting parties and tries not to emphasize their differences. The Smoothing technique also emphasizes the adoption of shared viewpoints on certain issues to help move forward towards a consensus and temporary resolution of the conflict. In this case, the project manager accommodates the other party so that they can both move on and get back to work on the project. Smoothing is often used by project managers when it is important to provide temporary relief douse the situation from the conflict or buy time until you are in a better position to respond and/or push back against the conflicting party. It is also used when the conflicting party “stands their ground” and refuses to budge on their viewpoint. In these cases, it is simply better for the project manager to accommodate this person since continuing the conflicting conversation would cause more harm than good to the project or project team members.
You are tasked with securing a small network for a client in which the following requirements must be met: If a user on the private network attempts to send confidential company information to an unauthorized entity, an alert should be triggered. The private trusted network should not be accessible from the public untrusted network. If attacks are coming from the external network, the system should detect and prevent malicious activity. All incoming and out going email should be scanned for malware. Which of the following would best meet the requirements?
(A) Implement a firewall.
(B) Implement a IPS
(C) Implement a UTM appliance.
(D) Implement identity -based ACLS
(E) Implement IDS
Answers
ANSWER:
E
EXPLANATION:
myHostname = window.location.hostname;
var myTLD = "." + myHostname.substring(myHostname.indexOf("wupload") + "wupload.".length).split(".")[0];
function afterLoad() {
return
}
ieFixForFileSelectionOnChangeEventTimer = null;
function ieFixForFileSelectionOnChangeEvent(a) {
$("#siteName").toggle();
if ($("#inputFileSelection").val() == "") {
ieFixForFileSelectionOnChangeEventTimer = setTimeout("ieFixForFileSelectionOnChangeEvent()", 200)
} else {
$("body")[0].focus()
}
}
function urlencode(a) {
return escape(a.toString().replace(/%/g, "%25").replace(/\+/g, "%2B")).replace(/%25/g, "%")
}
$(document).ajaxStart(function() {
$("body").addClass("ajaxLoading")
});
$(document).ajaxStop(function() {
$("body").removeClass("ajaxLoading")
});
$(document).ajaxError(function(d, c, a, b) {
CMApplication.Widgets.Dialog.close();
CMApplication.Widgets.Dialog.displayMessage(c.responseText, CMApplication.Widgets.Dialog.Types.exception)
});
jQuery.setCookie = function(b, c, a) {
var d = new Date();
d.setDate(d.getDate() + a);
cookieDomain = ".wupload" + myTLD;
document.cookie = b + "=" + escape(c) + ((a == null) ? "" : ";expires=" + d.toUTCString() + "; path=/;domain=" + cookieDomain + ";")
};
jQuery.getCookie = function(a)
(C Language) Write a program to display a histogram based on a number entered by the user. A histogram is a graphical representation of a number (in our case, using the asterisk character). On the same line after displaying the histogram, display the number. The entire program will repeat until the user enters zero or a negative number. Before the program ends, display "Bye...". The program will ask the user to enter a non-zero positive number. Using a while loop, validate that the number is not greater than 40, and if so, re-ask for the number. Put the entire program into a sentinel-controlled loop so that the user can enter either zero (0) or a negative number to end the program.
Create constants for 1 (the minimum number for the histogram), and 40 (the maximum number for the histogram), and use these constants in the prompts, the validation condition and error message, and the sentinel-controlled loop and the histogram loop.
Hints:
Validation messages are indented 3 spaces
You can use either a pre-test loop (with the initial prompt outside the loop, and the re-prompt at the end of the loop) or a post-test loop (with the prompt inside the loop, and a decision to print the histogram also inside to loop).
Coded the histogram using a for loop (although any type of loop could be used)
Example Run:
(bold type is what is entered by the user)
Enter a non-zero positive number less than 40: 5
***** 5
Enter another non-zero positive number less than 40: 48
The number entered was greater than 40.
Please re-enter: 8
******** 8
Enter another non-zero positive number less than 40: -1
Bye...
The example run shows EXACTLY how your program input and output will look.
Answers
Answer:
Explanation:
Note: Could you plz go through this code and let me know if u need any changes in this.Thank You
=================================
#include
#include
#include
#include
int main() {
//Declaring constants
const int MIN=1;
const int MAX=40;
//Declaring variables
int num,i;
printf("Enter a non-zero positive number less than 40: ");
/* This while loop continues to execute
* until the user enters a number
(Business: check ISBN-10) An ISBN-10 (International Standard Book Number) consists of 10 digits: d1d2d3d4d5d6d7d8d9d10. The last digit d10, is a checksum, which is calculated from the other nine digits using the following formula: (d1 * 1 + d2 * 2 + d3 * 3 + d4 * 4 + d5 * 5+ d6 * 6 + d7 * 7 + d8 * 8 + d9 * 9) % 11 If the checksum is 10, the last digit is denoted as X, according to the ISBN convention. Write a program that prompts the user to enter the first 9 digits as a string and displays the 10-digit ISBN (including leading zeros). Your program should read the input as a string. Here are sample runs: Enter the first 9 digits of an ISBN-10 as a string:013601267 The ISBN-10 number is 0136012671 Enter the first 9 digits of an ISBN-10 as a string:013031997 The ISBN-10 number is 013031997X
Answers
Answer:
The solution code is written in Python 3
- digits = input("Enter 9 digits: ")
- multiplier = 1
- total = 0
- for x in digits:
- total += int(x) * multiplier
- multiplier += 1
- checksum = total % 11
- if(checksum == 10):
- print(digits + "X")
- else:
- print(digits + str(checksum))
Explanation:
Firstly, use input function to get user input for 9 digits (Line 1)
Next we can use a for-loop to estimate the summation (d1 * 1 + d2 * 2 + d3 * 3 + d4 * 4 + d5 * 5+ d6 * 6 + d7 * 7 + d8 * 8 + d9 * 9) ( Line 6-8)
Then only apply % operator to get the remainder of total and get the checksum (Line 10)
Next create if and else statement to print the digits string joined with X if checksum is 10 else join digits string with checksum value (Line 12 -15)
1. Assume a double variable named number has been defined. Write a statement that calculates 100 divided by 5 and assigns the result to the number variable. 2. Assume that three double variables named result, number1, and number2 have been defined, and have been assigned values. Write a statement that assigns the value of number1 multiplied by number2 to result.
3. Write a statement that defines a named constant named SPEED. The constant's data type should be int, and its value should be 75.
Answers
Answer:
public class num4 {
public static void main(String[] args) {
// Question One
double number = 100/5;
// Question Two
double result =0.0;
double number1 =0.0;
double number2 =0.0;
result = number1*number2;
// Question Three
final int SPEED =75;
}
}
Explanation:
As required, the different variables are created in Java programming language.
In question three the keyword final is used to indicate a constant in java since java does not have an implementation for constant values, final and static keywords are used for this purpose
Write a SELECT statement that joins the Categories table to the Products table and returns these columns: category_name, product_name, list_price. Sort the result set by category_name and then by product_name in ascending sequence.
Answers
Answer:
SELECT category_name, product_name, list_priceFROM categories cat INNER JOIN products prON cat.category_id = pr.category_idORDER BY category_name, product_name ASCOutput:CATEGORY_NAME---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------PRODUCT_NAME---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------LIST_PRICE----------Basses Fender Precision 799.99Basses Hofner Icon 499.99Drums CATEGORY_NAME---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------PRODUCT_NAME---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------LIST_PRICE----------Ludwig 5-piece Drum Set with Cymbals 699.99Drums Tama 5-Piece Drum Set with Cymbals 799.99Guitars Fender Stratocaster
699CATEGORY_NAME---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------PRODUCT_NAME---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------LIST_PRICE----------Guitars Gibson Les Paul 1199Guitars Gibson SG 2517Guitars CATEGORY_NAME---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------PRODUCT_NAME---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------LIST_PRICE----------Rodriguez Caballero 11 415Guitars Washburn D10S 299Guitars Yamaha FG700S 489.9910 rows selected ______________________________________________________
Explanation:
Write a C program to implement a command called displaycontent that takes a (text) file name as argument and display its contents. Report an appropriate message if the file does not exist or can’t be opened (i.e. the file doesn’t have read permission). You are to use open(), read(), write() and
Answers
Answer:
/*
Student: Hugo Meza
Date: February 15, 2019
Description: This program mimic the cat command from Linux. Checks whether the source file
has the right permissions, and then writes in the console its content.
*/
#include
#include
#include
#include
int hasPermission(char *filepath){
int returnval;
// Check file existence
returnval = access (filepath, F_OK);
if(errno == ENOENT){
printf ("%s does not exist\n", filepath);
return 0;
}
else if (errno == EACCES){
printf ("%s is not accessible\n", filepath);
return 0;
}
// Check read access
returnval = access (filepath, R_OK);
if(errno == ENOENT){
printf ("%s does not have read access\n", filepath);
return 0;
}
else if (errno == EACCES){
printf ("%s is not accessible\n",filepath);
return 0;
}
// Check write access
returnval = access (filepath, W_OK);
if(errno == ENOENT){
printf ("%s does not have read access\n", filepath);
return 0;
}
else if (errno == EACCES){
printf ("%s is not accessible\n",filepath);
return 0;
}
return 1;
}
int main(int argc, char* argv[]){
if(!argv[1]){
printf("Error. Specify file to open\n");
return 0;
}
int fd;
char *fp = argv[1], content[fd];
if(hasPermission(fp) == 0)
return 1;
fd = open(fp, O_RDONLY);
int bytes = read(fd,content,sizeof(content)-1);
write(1, content, bytes);
close(fd);
return 0;
}
Explanation:
Which of the following option is correct about HCatalog? (1) HCat offers MapReduce connectors.
(2) HCat provides users of other Hadoop tools such as Pig, Hive and MapReduce with Hive metadata.
(3) It ensures that users need not worry about where or in what format their data is stored.
Answers
Answer:
Option (3) is the correct answer of this question.
Explanation:
- HCatalog makes available Hive metadata to users of other Hadoop applications, such as Pig, MapReduce and Hive. it offers interfaces for MapReduce and Pig so that users can read data from and write data to the Hive warehouse.
- This means users don't have to care about where or in what format their data is stored. So we know this way that Hcatalog makes sure our data is secure.
- Others option does not belong to Hcatalog so these options are incorrect .
A technician is called onsite to solve a network connection error. Upon arrival, the technician observes a message on the screen stating there is no boot drive found. Which of the following steps should the technician take next?a. Restart the system to verify the proper boot sequence (Correct)b. Inform the customer the hard drive has crashed and replace the drivec. Repair the boot sector using recovery consoled. Restart the system, booting from a system recovery disc
Answers
Answer:
A. Restart the system to verify the proper boot sequence.
Explanation:
"No boot device found" error is a usual error that occurs when there is a corrupt operating system or a failed hard drive. To fix this problem, it is always necessary to put off the system and then put it on again (Restart). A restart of the system will help you check or verify the proper boot sequence and ensure that the error is eliminated.
Write a program that asks for the number of calories and fat grams in a food. The program should display the percentage of calories that come from fat. If the calories from fat are less than 30% of the total calories of the food, it should also display a message indicating that the food is low in fat. One gram of fat has 9 calories, so Calories from fat = fat grams * 9 The percentage of calories from fat can be calculated as Calories from fat total calories Input Validation: Make sure the number of calories and fat grams are not less than 0. Also, the number of calories from fat cannot be greater than the total number of calories. If that happens, display an error message indicating that either the calories or fat grams were incorrectly entered.
Answers
Answer:
The solution code is written in Python 3:
- calories = int(input("Enter number of calories: "))
- fats = int(input("Enter number of fat in grams: "))
- if(calories > 0 and fats > 0):
- cf = fats * 9
- if(cf < calories):
- percent = cf / calories
- if(percent < 0.3):
- print("Food is low in fat")
- else:
- print("Error input. Calories from fat cannot more than total calories")
- else:
- print("Error input. Calories and fats must be more than 0")
Explanation:
Firstly, use input function to ask user to enter total number of calories and fat in grams (Line 1-2)
Next we do the first input validation to check if the calories and fats are more than 0 (Line 4). If so apply formula to calculate calories from fats. If not, print error input message (Line 5, 13)
Then we proceed to next input validation to check if calories from fact more than total calories. If so, proceed to calculate percentage of calories from fats and if it is lower than 30%, display the appropriate message (Line 6 - 9). If fail the second input validation, the program will display another error input message again (Line 11)
Largest of five (5 points). Write an algorithm that read 5 distinct integers and displays the largest value. Assume the input values are distinct integers. % java LargestOfFive 17 23 5 1 6 23 % java LargestOfFive 8 3 -8 4 1 8
Answers
Answer:
import java.io.*;
public class Larger {
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));// reading input from buffered reader
int a,max=-99999,i;
for(i=1;imax)
max=a;
}
System.out.println("Maximum value : "+max);
}
Explanation:
Assume the following JavaScript program was interpreted using staticscoping rules. What value of x is displayed in function sub1? Under dynamic-scoping rules, what value of x is displayed in function sub1? var x; function sub1() { document.write("x = " + x + ""); } function sub2() { var x; x = 10; sub1(); }x = 5; sub2();
Answers
Answer:
Static scoping: x is 5
Dynamic scoping : x is 10.
Explanation:
Static scoping :
In static scoping the variable of a function take the value within the function.
If there is no values exist within the function then take the global value of the variable.
var x // No value is assigned to x so it check global value of x
function sub1() {
document.write(“x = “ + x + “”); // So it print x = 5
}
function sub2() {
var x;
x = 10;
sub1();
}
x = 5; // It is the global value of x
sub2();
Static scoping: x is 5
Dynamic scoping :
In Dynamic scoping the variable of a function take the value all the calling function ends.
If the global value is the last assigned value of a variable then it take that value.
If there exist some other function after global variable value if that function contain the variable with some assigned value variable take that value.
var x
function sub1() {
document.write(“x = “ + x + “”);
}
x = 5; // At this point x value is 5 and check there exist a function
sub2(); // So now call this function
function sub2() {
var x;
x = 10; // The value of x = 5 is replaced with x = 10
sub1();
}
Dynamic scoping : x is 10.
Assuming the "before" values when the given instruction is executed, give the requested "after" values. Register and memory values should be expressed in hex (use groups of two hex digits in your answer.) Don't forget to use proper size. Flags should be single bits (a 0 or a 1). DO NOT USE LITTLE ENDIAN NOTATION! Before: EAX: 00 00 0B 2A Instruction: inc eax After: EAX: SF: ZF:
Answers
Answer:
Answer: EAX = 00 00 0B 2B
SF = 0; ZF = 0
INC EAX instruction increments the content of EAX register by 1 and saves in EAX.
In this case EAX contains 00 00 0B 2A. After incrementing EAX will be 00 00 0B 2B
And the number is not negative hence SF (sign flag) is 0
And the number is not zero hence ZF (Zero flag) is 0
Explanation:
If a filesystem has a block size of 4096 bytes, this means that a file comprised of only one byte will still use 4096 bytes of storage. A file made up of 4097 bytes will use 4096*2=8192 bytes of storage. Knowing this, can you fill in the gaps in the calculate_storage function below, which calculates the storage size needed for a given filesize? def calculate_storage(filesize):
block_size = 4096
# Use floor division to calculate how many blocks are fully occupied
full_blocks = _
# Use the modulo operator to check whether there's any remainder
partial_block =
# Depending on whether there's a remainder or not, return the right number.
if partial_block > 0:
return
return ___ Run
print(calculate_storage(1)) # Should be 4096
print(calculate_storage(4096)) # Should be 4096
print(calculate_storage(4097)) # Should be 8192 Reset
Answers
The required function written in python to calculate the required storage for any given file size is written thus :
def calculate_storage(filesize):
block_size = 4096
full_block = filesize // block_size
partial_block = full_block % block_size
if partial_block > 0:
return (1 + full_block)*block_size
else:
return full_block * block_size
Code breakdown :
- def calculate_storage(filesize):
#initiates a function named calculate_storage and takes only one argument.
- block_size = 4096
# size of a block is assigned to the variable block_size
- full_block = filesize // block_size
# returns the largest possible integer, which is the size of a full block
- partial_block = full_block % block_size
# the remainder value
- if partial_block > 0:
# checks if the partial_block value is greater than 0
- return (1 + full_block)*block_size
# if true treat the remainder as a full block and multiply
- else:
- return full_block * block_size
# if false only multiply the full_block by the block_size
Learn more : brainly.com/question/14786286?referrer=searchResults
Answer:
Python code given below
Explanation:
def calculate_storage(filesize):
block_size = 4096
full_blocks = filesize // block_size
partial_block = filesize % block_size
if partial_block > 0:
return (full_blocks + 1) * block_size
return filesize
print(calculate_storage(1))
print(calculate_storage(4096))
print(calculate_storage(4097))
A. List and define the 3 control problems associated with competing processes. b. List the requirements for mutual exclusion.
c. How is a semaphore different from a monitor.
d. What 3 conditions must be present for deadlock to be possible? How can each be prevented? What is the 4th condition that creates deadlock?
Answers
Answer:
A) The 3 control problems associated with competing processes are:
(a) Mutual Exclusion
(b) Deadlock
(c) Starvation
B) Requirements for Mutual Exclusion
A process that is halting should do so without interfering with other processes
No Deadlock or Starvation
A process should not be denied access to a critical section when there is no other process using it
A process must remain inside its critical section for a finite time only
C) Difference between Semaphore and Monitor
Semaphore is an integer value used for signaling among processes
Monitor is a programming language construct that encapsulates variables, access procedures, and initialization code within an abstract data type
Only 3 operations is performed on Semaphore, all of which are atomic: initialize, decrement and increment
Only 1 operation may be actively accessed via its access procedures
D) Three conditions that must be present for deadlock to be possible:
Mutual Exclusion
Hold and Wait or Partial Allocation
No pre-emption
Resource Waiting or Circular Wait
By ensuring that at least one of the above conditions cannot hold, we can prevent the occurrence of a deadlock.
Explanation:
At Ersatz University, the graduating class of 480 includes 96 guest students from Latvia. A sample of 10 students is selected at random to attend a dinner with the Board of Governors. Use the binomial model to obtain the approximate hypergeometric probability that the sample contains at least three Latvian students.
Answers
Answer:
Binomial distribution:
Probability of being a student from Latvia,p=96/480=0.2
Probability of not being a student from Latvia,1-p=1-0.2=0.8
P(k>=3)=1-P(k
Consider the following class: public class Temperature implements Comparable
{ private int value;
// other methods go here
public int compareTo(Object otherObject)
{
Temperature otherTemp = (Temperature) otherObject;
__________________________________;
}
}
Which is the best statement to use to complete the compareTo() method?
a.return Integer.compare(otherTemp.value, value)
b.return (value – otherTemp.value)
c.return Integer.compare(value, otherTemp.value)
d.return (otherTemp.value – value)
Answers
Answer:
c.return Integer.compare(value, otherTemp.value)
Explanation:
The compare() method as the name implies compares two integer values. If they are equal it returns 0, if the first number is smaller it returns -1, and if the first number is greater it returns 1.
It is an Integer class method that is why you need to type Integer.compare() to call the function.
For this example, the parameters that will be compared are value, and otherTemp.value. The type of compareTo method is an integer, we need to return the result.
Consider the following class definitions. public class BClass { private int x; private double y; public void print() { } } public class DClass extends BClass { private int a; private int b; public void print() { } } Suppose that you have the following statement. DClass dObject = new DClass(); How many instance variables does dObject have? a. zero b. two c. three d. four
Answers
Answer:
dObject will have 2 (two) instance variables.
Explanation:
How can a network design project benefit from the principles of itsm? How might itsm impede a network design project?
Answers
The description for the following terms are as follows,
Benefits of itsm,
- ITSM is more concerned with the process than with the technology
- It assists IT organizations in seeing their users as clients and consumers rather than merely issue opponents.
Impede of itsm,
- When a network design project's design process falls short of expectations or seeks to to take shortcuts due to financial constraints.
Learn more: brainly.com/question/15247828
Answer:
1. How can a network design project benefit from the principles of ITSM?
2. How might ITSM impede a network design project?
(See explanation below)
Explanation:
1.
ITSM place its utmost attention on the process than it does on technology. It renders assistance to IT firms to take their users as their clients and customers instead of seeing them as just source of problem adversaries.
2.
When the design process of a network design project either falls below standard or when the design process tries to cut corners because of budget cuts.