Answer:
A
Explanation:
Using pointers and shared memory for IPC, what would you need to add to your code to ensure data integrity?
Explain how commit works in a multi-transaction / multi-system function and what would need to be in place for a rollback to be successful.
Explain how buffering of data achieves a more efficient way to do I/O. Why is it important to add buffering to I/O?
What is the difference between blocking calls and non-blocking calls? Explain 2 methods to remove blocking from your application.
Answer:
integrgrg
Explanation:
integrety or not iim not
Non-blocking code does not prevent execution from continuing while blocking code prevents execution from continuing until the operation is complete. Blocking calls hold off on returning until the I/O operation is finished. Synchronous results are returned from it.
What is the difference between blocking calls and non-blocking calls?Blocking calls hold off on returning until the I/O operation is finished. Synchronous results are returned from it. During the waiting period, nothing else in that process happens. In contrast, a non-blocking call uses a different method to check for completion and returns right away without any results.
Non-blocking code does not prevent execution from continuing while blocking code prevents execution from continuing until the operation is complete. Blocking occurs when subsequent JavaScript in the Node. js process needs to wait until a non-JavaScript activity is finished, according to the documentation for the language.
A program that is non-blocking does not prevent the execution of subsequent operations. Non-blocking techniques run in an asynchronous fashion. Asynchronously refers to the possibility that the program may not always run line by line.
To learn more about blocking and non-blocking calls refer to:
https://brainly.com/question/14286067
#SPJ2
Write an application that counts the total number of spaces contained in a quote entered by the user.
Answer:
Explanation:
The following code is written in Java. It asks the user for an input and saves it in a String variable. Then it loops through all the characters in the string and counts the spaces. Finally, it prints the total number of spaces in the String.
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter Line Now:");
String userInput = in.nextLine();
int spaceCount = 0;
for (int x = 0; x < userInput.length(); x++) {
if (userInput.charAt(x) == ' ') {
spaceCount++;
}
}
System.out.println(spaceCount);
}
Write a program that inputs numbers and keeps a running sum. When the sum is greater than 100, output the sum as well as the count of how many numbers were entered.
total = 0
count = 0
while total < 100:
num = int(input("Enter a number: "))
total += num
count += 1
print("Sum: {}".format(total))
print("Numbers Entered: {}".format(count))
I'm pretty sure this is what you're looking for. Best of luck!
Dance dance1 = new Dance("Tango","Hernandos Hideaway");
Dance dance2 = new Dance("Swing","Hound Dog");
System.out.println(dance1.toString());
System.out.println(dance2.toString());
class Dance
{
private String name;
private String song;
public Dance(String name, String s)
{
this.name = name;
song = s;
}
public String toString()
{
return name + " " + song;
}
}
What is printed when the program is executed?
a
null null
null null
b
Hernandos Hideaway null
Hound Dog null
c
null null
Swing Hound Dog
d
Tango Hernados Hideaway
Swing Hound Dog
e
null Hernandos Hideaway
null Hound Dog
Answer:
The output of the program is (d)
Tango Hernados Hideaway
Swing Hound Dog
Explanation:
Analyzing the given code segment
In class Dance,
A method named dance was defined with an instance of two string variables/values
which are name and song
public Dance(String name, String s)
In the main of the program,
The first line creates an instance of Dance as dance1
dance1 is initialized with the following string values: "Tango","Hernandos Hideaway"
- The first string value "Tango" will be passed into the name variable of the Dance method
- The second string value "Hernandos Hideaway" will be passed into the song variable of the Dance method
Next, another instance of Dance is initialized as dance2
dance2 is initialized with the following string values: "Swing","Hound Dog"
- The first string value "Swing" will be passed into the name variable of the Dance method
- The second string value "Hound Dog" will be passed into the song variable of the Dance method
On line 3 of the main: System.out.println(dance1.toString());
The values of dance1, which are "Tango","Hernandos Hideaway" are printed
On line 4 of the main: System.out.println(dance2.toString());
The values of dance1, which are "Swing","Hound Dog" are printed
Hence, option d answers the question
What are some applications of a Router?
help me pls difhdifhedioheiofhoidhvoidheiofhioefhioe
Answer:
thanks for the free points
A DVD-ROM can store more data than a CD-ROM of the same size. Comment.
Answer:
ya its true that DVD-ROM can store more data except CD-ROM
Explanation:
more dat saving in with DVD-ROM
True/False: A datasum can be generated for any width of data. For example, we can create an 8, 16, or 32 bit datasum for 8, 16, or 32 bit data elements respectively.
Answer:
true
Explanation:
What is the best prediction she could make about this
semester's text?
Natalia's class read Shakespeare's Romeo and Juliet
last semester and took a field trip to see it performed
live in a community theater. Today, Natalia learned that
her class will read another work by Shakespeare this
semester
It is a play.
It is an adventure.
It is a fairy tale.
It is a fable.
Answer:its a play
Explanation:
Answer:
A. It is a play
Explanation:
Got the answer correct on the quiz
I need help with my homework:
Greetings, secret agent 00111! Your mission, should you choose to accept it, is to help Agent M plan a pizza party. Unfortunately, M has no idea how much pizza to order for his 83 guests. Luck for him, party planning is your specialty! Estimate the number of pizzas he’ll need on scratch paper, and then convert that number to binary and write it here.
Answer:
You need to order 11100 pizzas.
Explanation:
A couple of assumptions here.
Each pizza has 12 slices. Each guest will eat 4 slices (1/3 of a pizza).
83 * 1/3 = 28 pizzas
28 = 11100
4. Word Separator:Write a program that accepts as input a sentence in which all of thewords are run together but the first character of each word is uppercase. Convert the sentence to a string in which the words are separated by spaces and only the first word starts with an uppercase letter. For example the string “StopAndSmellTheRoses.” would be converted to “Stop and smell the roses.”
*python coding
sent = input("")
count = 0
new_sent = ""
for i in sent:
if count == 0:
new_sent += i
count += 1
else:
if i.isupper():
new_sent += " "+i.lower()
else:
new_sent += i
print(new_sent)
The above code works if the user enters the sentence.
def func(sentence):
count = 0
new_sent = ""
for i in sentence:
if count == 0:
new_sent += i
count += 1
else:
if i.isupper():
new_sent += " " + i.lower()
else:
new_sent += i
return new_sent
print(func("StopAndSmellTheRoses."))
The above code works if the sentence is entered via a function.
what do we use HTTP and HTML for?
HTML is a Language while HTTP is a Protocol.
HTML tags are used to help render web pages. The Hypertext Mark-up Language (or HTML) is the language used to create documents for the World Wide Web.
HTTP (Hypertext Transfer Protocol) is a protocol for transferring the hypertext pages from Web Server to Web Browser. HTTP is a generic and stateless protocol which can be used for other purposes as well using extensions of its request methods, error codes, and headers. Basically, HTTP is a TCP/IP based communication protocol, that is used to deliver data (HTML files, image files, query results, etc.) on the World Wide Web.
in pycharm, write a program that prompts the user for their name and age. your program should then tell the user the year they were born. here is a sample execution of the program what is your name? Amanda how old are you? 15. This is what I have so far but I can't get pycharm to tell me the year I was born.
import datetime
name = input("What is your name? ")
age = input("How old are you? ")
year = datetime.datetime.now().year
print("Hello ' + name + ' you were born in " (year - age))
Let's address the few mistakes in your code so far. First, age is of type string and year is of type int. You're trying to subtract an int by a string and that doesn't work. Also, you have inconsistent quotes "Hello '. You should always use the same type of quote. The (year - age)) isn't properly formatted into the print statement. There is no plus adding it.
Here's my working code:
import datetime
name = input("What is your name? ")
age = int(input("How old are you? "))
year = datetime.datetime.now().year
print("Hello " + name + " you were born in " + str((year - age)))
I just fixed your code. Best of luck.
In python, date and time seem to be not its type of data, but the date and time named module can be imported for it to work with the time and date. So, the program and its description can be defined as follows:
Program Explanation:
Importing "datetime" package.Defining two-variable "name, age" in which we input value from user-end.Defining another variable "year" that holds current year value.In the next step, the print method has used that prints the user name with the born year.Program:
import datetime#import package datetime
name = input("What is your name? ")#defining a variable name that uses an inputs method to input string value
age = int(input("How old are you? "))#defining a variable age that uses an inputs method with the int to input value
year = datetime.datetime.now().year#defining a variable year that takes current value in it
print("Hello " + name + " you were born in " + str((year - age)))#defining a print method that print name value with born year
Output:
Please find the attached file.
Learn more:
brainly.com/question/19032453
salvado has a flash disk of 1.5GB and wants to store more music files of 950KBs each . How many files will he be able to store on his flash disk?
Answer:
Convert 1.5GB to KBs = 1500000kb
1500000kb/950kb ≈ 1579
Explanation:
A flash disk is a storage device. It has enough memory to store large files. In the given question, the flash disk has a memory of 1.5GB and can store 1578.94 music files of 950KBs each.
What is flash disk?A flash disk is a data storage device that uses flash memory specifically : a small rectangular device which is designed to be plugged directly into a USB port on a computer. It is often used for transferring files from one computer to another computer system.
Flash disks have no mechanical platters or access arms. It is termed "disk" because of the data which are accessed as if they were on a hard drive. The disk storage structure is emulated.
In the given question, the flash disk contains 1.5GB memory and has to store music files of 950KBs each. For determining the number of music files which can be stored in the flash disks, we have to first convert the unit of flash disk from GB to KB:
1GB = 1,000,000 KB
1.5 GB = 1,500,000 KB
size of music file = 950 KB
Number of music files that can be stored = storage in the flash disk ÷ size of the music file
Number of music files = 1500000KB ÷ 950KB
Number of music files = 1578.94
Learn more about Flash disk here:
https://brainly.com/question/1130880
#SPJ2
Write a statement that calls the recursive method backwardsAlphabet() with parameter startingLetter.
Answer:
Explanation:
public class RecursiveCalls {
public static void backwardsAlphabet(char currLetter) {
if (currLetter == 'a') {
System.out.println(currLetter);
}
else {
System.out.print(currLetter + " ");
backwardsAlphabet(--currLetter);
}
return;
}
public static void main (String [] args) {
char startingLetter = '-';
startingLetter = 'z';
// Your solution goes here
backwardsAlphabet(startingLetter);
return;
}
}
All early programming languages were object-oriented.
a) True
b) False
True
False
Answer:
False.
Object orientation is a paradigm that came later.
server.
10. The Domain Name refers to the
a) Mail
b) Google
c) Internet
d) Local
Answer:
C.
Explanation:
C++ Code Outputs.
I have a problem with my code and I don't know how to make it run as the project that I need below.
This is my code:
#include
#include
#include
#include
using namespace std;
struct courseInfo{
string name;
int unit;
char grade;
};
struct Student {
string fName;
string lName;
string idNumber;
courseInfo courses[2];
int unitCompleted;
double gpa;
};
Student s;
bool openFile(ifstream &in);
void Print_info_one(Student s);
void Read_info(Student &s);
float Find_points(char c) ;
bool openFile(ifstream &inFile){
string line;
int i=0,k=0;
string fName="", lname="", id="", name1="", name2="";
char grade1, grade2;
int unit1, unit2;
if (inFile.is_open())
{
while (getline(inFile, line))
{
while (line[i] != ',')
{
fName += line[i];
i++;
}
i++;
i++;
while (line[i] != ' ')
{
lname += line[i];
i++;
}
i++;i++;
while (line[i] != ' ')
{
id += line[i];
i++;
}
i++;
int count=0;
while (count <2)
{
name1 += line[i];
i++;
if(line[i] == ' ' ) count++;
}
i++;
grade1 = line[i];
i++;i++;
unit1 = line[i]-'0';
i++;i++;
count=0;
while (count <2)
{
name2 += line[i];
i++;
if(line[i] == ' ' ) count++;
}
i++;
grade2 = line[i];
i++;i++;
unit2 = line[i]-'0';
}
inFile.close();
s.fName = fName;
s.lName = lname;
s.idNumber = id;
s.courses[0].name = name1;
s.courses[0].grade = grade1;
s.courses[0].unit = unit1;
s.courses[1].name = name2;
s.courses[1].grade = grade2;
s.courses[1].unit = unit2;
s.unitCompleted = unit1 + unit2;
s.gpa = (unit1*Find_points(grade1) + unit2*Find_points(grade2))/(unit1+unit2);
}
else
{
cout << "Error reading file\n";
return false;
}
return true;
}
void Print_info_one(Student s){
cout << "Name: " << s.fName << ", " << s.lName << " ID Number: " << s.idNumber << " Course 1 Name: " << s.courses[0].name << " Grade: "
<< s.courses[0].grade << " Units: " << s.courses[0].unit << " Course 2 Name: " << s.courses[1].name << " Grade: "
<< s.courses[1].grade << " Units: " << s.courses[1].unit << " Unit completed: " << s.unitCompleted << " GPA:" << s.gpa << endl;
}
void Read_info(Student &s){
}
float Find_points(char grade){
switch (grade)
{
case 'A':
return 4.0;
break;
case 'B':
return 3.0;
break;
case 'C':
return 2.0;
break;
case 'D':
return 1.0;
break;
case 'F':
return 0;
break;
default:
break;
}
return 0;
}
int main() {
ifstream inFile;
std::fstream fs;
fs.open ("input.txt", std::fstream::in );
Print_info_one(s);
return 0;
}
In the screenshots i'm showing the inputs and outputs that I need for the test
Answer:
#include
#include
#include
#include
using namespace std;
struct courseInfo{
string name;
int unit;
char grade;
};
struct Student {
string fName;
string lName;
string idNumber;
courseInfo courses[2];
int unitCompleted;
double gpa;
};
Student s;
bool openFile(ifstream &in);
void Print_info_one(Student s);
void Read_info(Student &s);
float Find_points(char c) ;
bool openFile(ifstream &inFile){
string line;
int i=0,k=0;
string fName="", lname="", id="", name1="", name2="";
char grade1, grade2;
int unit1, unit2;
if (inFile.is_open())
{
while (getline(inFile, line))
{
while (line[i] != ',')
{
fName += line[i];
i++;
}
i++;
i++;
while (line[i] != ' ')
{
lname += line[i];
i++;
}
i++;i++;
while (line[i] != ' ')
{
id += line[i];
i++;
}
i++;
int count=0;
while (count <2)
{
name1 += line[i];
i++;
if(line[i] == ' ' ) count++;
}
i++;
grade1 = line[i];
i++;i++;
unit1 = line[i]-'0';
i++;i++;
count=0;
while (count <2)
{
name2 += line[i];
i++;
if(line[i] == ' ' ) count++;
}
i++;
grade2 = line[i];
i++;i++;
unit2 = line[i]-'0';
}
inFile.close();
s.fName = fName;
s.lName = lname;
s.idNumber = id;
s.courses[0].name = name1;
s.courses[0].grade = grade1;
s.courses[0].unit = unit1;
s.courses[1].name = name2;
s.courses[1].grade = grade2;
s.courses[1].unit = unit2;
s.unitCompleted = unit1 + unit2;
s.gpa = (unit1*Find_points(grade1) + unit2*Find_points(grade2))/(unit1+unit2);
}
else
{
cout << "Error reading file\n";
return false;
}
return true;
}
void Print_info_one(Student s){
cout << "Name: " << s.fName << ", " << s.lName << " ID Number: " << s.idNumber << " Course 1 Name: " << s.courses[0].name << " Grade: "
<< s.courses[0].grade << " Units: " << s.courses[0].unit << " Course 2 Name: " << s.courses[1].name << " Grade: "
<< s.courses[1].grade << " Units: " << s.courses[1].unit << " Unit completed: " << s.unitCompleted << " GPA:" << s.gpa << endl;
}
void Read_info(Student &s){
}
float Find_points(char grade){
switch (grade)
{
case 'A':
return 4.0;
break;
case 'B':
return 3.0;
break;
case 'C':
return 2.0;
break;
case 'D':
return 1.0;
break;
case 'F':
return 0;
break;
default:
break;
}
return 0;
}
int main() {
ifstream inFile;
std::fstream fs;
fs.open ("input.txt", std::fstream::in );
Print_info_one(s);
return 0;
Explanation:
A Protocol for networked information
Answer:
Internet Protocol (IP), which uses a set of rules to send and receive messages at the Internet address level; and. additional network protocols that include the Hypertext Transfer Protocol (HTTP) and File Transfer Protocol (FTP), each of which has defined sets of rules to exchange and display information.
Explanation:
could i plz have brainliest so close to next rank
Write a function named power that accepts two parameters containing integer values (x and n, in that order) and recursively calculates and returns the value of x to the nth power.
Answer:
Following are the code to the given question:
int power(int x, int n)//defining a method power that accepts two integer parameters
{
if (n == 0)//defining if block to check n equal to 0
{
return 1; //return value 1
}
else//defining else block
{
x = x * power(x, --n); //use x variable to call method recursively
}
return x; //return x value
}
Explanation:
In the above-given code, a method power is defined that accepts two integer variable in its parameter, in the method a conditional statement is used which can be defined as follows:
In the if block, it checks "n" value, which is equal to 0. if the condition is true it will return value 1.In the else block, an integer variable x is defined that calls the method recursively and return x value.Describe an algorithm that takes as input a list of n integers in nondecreasing order and produces the list of all values that occur more than once. (
Answer:
Input a series of integer numbers and split the string from the input to get a list. Then check and convert each string to integer with a list comprehension. Create a new variable with a value equal to the set of the list ( to get unique values) then check for the occurrence of each value in the original list.
Explanation:
This algorithm is used to check for the occurrence of values in a list that has been sorted in ascending order. This is faster if the items in the list is not converted to integer yet (still strings) before writing a for loop to check the value count in the list.
Which software programs should students avoid using to create and submit course work? (Choose all that apply.
Answer:
The answer to this question is given below in the explanation section.
Explanation:
You can submit your course work most often in a Word document. Because in the word document, you can insert text, numbers, images, charts, shapes whatever you want such as required for writing a course assignment or course work- easily. Because your final work should be in a complete document.
The correct options to this question, that you should need to avoid using to create and submit course work are pages, numbers, and keynote.
Because while submitting the course work, you need to submit a complete word document, it is not required to you that you have to submit numbers, pages, or keynotes along with the course assignment. You can create a course assignment or project document in word and submit to your respective teacher. However, you can not create your course work using keynotes or pages, etc as given in the question.
The software programs that students should avoid using to create and submit coursework include pages, numbers, and keynotes.
It should be noted that it's vital that while submitting a course work, one needs to submit a complete word document.
It is not required that the person submits pages, numbers, and keynotes. The most important thing is the word document that'll be submitted. Therefore, the software programs that students should avoid using to create and submit course work include pages, numbers, and keynotes.
Read related link on:
https://brainly.com/question/19788811
describe at least five ways in which information technology can help studying subjects other than computing
Answer:
I'd that IT can help in a great many different fields like
Mathematics, in a manner of solving complex math equations
Statistics, in a manner of creating complex graphs with millions of points
Modeling, in a manner of creating models from scratch, either for cars, personal projects or characters for video games and entertainment
Advertising, in a manner of using IT to create not only the advertisements themselves but also, spreading that advertisement to millions in a single click
Music/Audio, in a manner of creating new sounds and music that wouldn't be able to work in any practical manner
Explanation:
who plays a role in the finanical activites of a company
Financial managers are responsible for the financial health of an organization. They produce financial reports, direct investment activities, and develop strategies and plans for the long-term financial goals of their organization.
Which line of code in this program is MOST likely to result in an error
Answer:
What are the choices?
Explanation:
Answer:
line 2 it needs quotation marks :D
Explanation:
give the one simple program using c++programming language
Answer:
the ejedjrjr eenekrr
eueeue
Explanation:
u4rururirw
Where should citations be included in your research paper? Select all that apply.
In the header
At the end of every paragraph
As footnotes
In a separate Works Cited page
Answer:
it would be the first one because it's the header and that's what applies
What term refers to a sequence of statements in a language that both humans and computers can understand?
a
hexadecimal
b
program
c
binary
d
macro
Answer your answer is Macro
Explanation:
Macro shares language both the computer and the programmer can undestand.
Shelly recorded an audio composition for her presentation. Arrange the following steps that Shelly followed in the proper order.
She added effects to her audio composition.
She saved her audio composition on an optical drive.
She connected her microphone to her computer.
She saved the audio composition in an appropriate file format.
She selected the record option in her DAW.
Answer:
The answer to this question is given below in the explanation section.
Explanation:
Shelly recorded an audio composition for her presentation. She needs to follow the following proper orders to get composition done for her presentation.
She connected her microphone to her computer.She selected the record option in her DAW.She added effects to her audio composition.She saved the audio composition in an appropriate file format.She saved her audio composition on an optical drive.Answer:
She connected her microphone to her computer.
She selected the record option in her DAW.
She added effects to her audio composition.
She saved the audio composition in an appropriate file format.
She saved her audio composition on an optical drive.
The opening on the front of a camera that regulates the amount of light entering the lenses is called:
Answer:
The Aperture is part of the camera lens. It controls how much of the light that enters the camera lens reaches the image sensor which is located inside the cameraExplanation: