1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
alexira [117]
3 years ago
11

Design a program using ordinary pipes in which one process sends a string message to a second process, and the second process re

verses the case of each character in the message and sends it back to the first process. for example, if the first process sends the message hi there, the second process will return hi there. this will require using two pipes, one for sending the original message from the first to the second process and the other for sending the modified message from the second to the first process. you can write this program using either unix or windows pipes.
Computers and Technology
1 answer:
Dmitry [639]3 years ago
5 0

Here's a solution in C#. Create two console applications, one for the client and one for the server. In the server, put this:

           Console.WriteLine("Listening to pipe...");

           var server = new NamedPipeServerStream("BrainlyPipe");

           server.WaitForConnection();

           var reader = new StreamReader(server);

           var writer = new StreamWriter(server);

           while (true)

           {

               var line = reader.ReadLine();

               if (!server.IsConnected) break;

               Console.WriteLine("Received: " + line);

               writer.WriteLine(ChangeCase(line));

               writer.Flush();

           }

To change case, add this function:

       public static string ChangeCase( string s)

       {

           var sb = new StringBuilder();

           foreach(char c in s)

               sb.Append(char.IsUpper(c) ? char.ToLower(c) : char.ToUpper(c));

           return sb.ToString();

       }

In the client, put this:

           var client = new NamedPipeClientStream("BrainlyPipe");

           client.Connect();

           var reader = new StreamReader(client);

           var writer = new StreamWriter(client);

           writer.WriteLine("Brainly question 13806153 demo");

           writer.Flush();

           Console.WriteLine(reader.ReadLine());

           Console.ReadLine();


You might be interested in
Which one of the following is a correct declaration for a method named passAList that has as arguments an array list myList of s
alekssr [168]

Answer:

"public static void passAList(ArrayList<Integer> myList, int[] intArr)", is the correct answer for the above question.

Explanation:

Missing information :

  • The option is missing but the question states "choose from the following". The correct defining syntax is defined above.

Detailed Explantion :

  • The above question asked about syntax which takes the value of list and array as an argument.
  • It is already defined in the above syntax.
  • And the value is passed by the user at the time of function call.
  • The array list is defined by the help of the ArrayList class and the array is defined by the help of the "[]" symbol.

3 0
3 years ago
What are the two biggest strength as a student
aleksandrvk [35]
Knowledge, and your brain.
3 0
3 years ago
Read 2 more answers
Drag each tile to the correct box.
V125BC [204]

Answer:

Creates order and harmony → <em>color</em>

Creates an emotional impact → <em>texture</em>

Brings a feeling of depth to a design →<em> form</em>

Draws or minimizes attention → <em>space</em>

Divides space and redirects the eye → <em>shape</em>

Explanation:

The visual element that creates order and harmony is <em>color</em>

Color can be used to create visible patterns that can be recognized as being in harmony or disagreement

The visual element that creates emotional impact is <em>texture</em>

Texture can be used to convey either the emotions of the object or the artist

The visual element that brings a feeling of depth to a design is<em> form</em>

Form is used to present a 3-D appearance of an art, and therefore, it is used to show depth of a 2-D drawing

The visual element that draws or minimizes attention is <em>space</em>

The arrangement, location, and size of the space occupied by an object can be used to draw or minimize attention

The visual element that divides space and redirects the eye is <em>shape</em>

Shape is used to divide space into areas easily recognizable by the eye

5 0
2 years ago
________ are used in input, processing, and output operations that can help create more efficient programs as the data can be pr
lapo4ka [179]
Functional requirements <span>are used in input, processing, and output operations that can help create more efficient programs as the data can be processed many times without having to be input again.
</span>The functional requirements define function/s of a system or its component. It <span>describes what a software system should do.</span>
8 0
3 years ago
Explain the concept of risk management, including risk identification, assessment, and control.
abruzzese [7]

Answer:

Risk management is the technique that is used for managing the risky situation so that security of the system or organization can be maintained. The risk can be reduced by parameters like monitoring the system,alertness, preventive measures etc. There are terms related with the risk management for prevention of the risk such as risk control ,risk identification and risk assessment .

  • Risk control is the method that is used for calculating the loss or damage experience and then taking the correct measures to reduce the loss and thus, controlling the risk.
  • Risk assessment is the analyzation of the threats and source of damage/loss that is caused or can be caused by assessing the whole process and functioning.
  • Risk identification is the technique through which the threat is listed over a document and sorted in accordance with the category of risk, risk response etc.  

7 0
3 years ago
Other questions:
  • ___ are files of related records organized according to logical systems and stored on computer-accessible media.
    5·1 answer
  • Plugging in a cable is a good troubleshooting technique. <br> True or false
    5·1 answer
  • In a paragraph of no less than 125 words, describe how technology helps business professionals to be more efficient. Include exa
    12·2 answers
  • Write the percentage 5 1/4 as a decimal​
    8·1 answer
  • With which network connection type does the vm obtain ip addressing information from its host?
    11·1 answer
  • Unless grunkle stan pines is mistaken, there is a family of deer’s in his garden
    6·1 answer
  • Jim wants to buy a car, but he’ll probably only need it for a couple of years. He has a short commute to work, so he won’t be pu
    5·1 answer
  • Stuart wants to delete some text from a slide. What should Stuart do?
    8·1 answer
  • The Fibonacci sequence begins with 0 and then 1 follows. All subsequent values are the sumof the previous two, for example: 0, 1
    11·1 answer
  • HELP PLZZZZZZZZ!!!!!!!!!!!
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!