#How to run this server #Use the datetime classes to create, extractt and munipulate dates and times.
from datetime import datetime
#Use json to format your response
import json
#import the requests library to be able to SEND request
import requests
#From the flask library, import only the Flask, request ad Response classes.
#the request class (not the same as the requests library) is used to to used to recieve requests
#if you have to convert several objects as one nested json structure, you cannot use flask,jsonify.
app = Flask(__name__)
CORS(app)
@app.route("/", method = ["POST"]) # Run this method when receiving any POST request
@cross_origin(origin='*') #Allow requests from any domain
def myMainFunction():
...
Write a java application using the concepts of multithreading for a flower
shop where flowers are delivered based on order.
The Airplane always needs to check with the Airport to see if it has an
available runway before it's able to take off or land. Simulate the above-
mentioned scenario using multi-threading.
Write a simulation program for the fruit market. The farmer will be able to
produce different types of fruits (apple, orange, grape, and watermelon),
and put them in the market to sell. The market has limited capacity and
farmers have to stand in a queue if the capacity is exceeded to sell their
fruits. Consumers can come to the market any time and purchase their
desired fruits; and if the fruits they want to buy runs out, they are willing to
wait until the supply of that kind is ready. (Hint: implementing this market
will encounter the producer and consumer problem, and it probably needs
multiple buffers for different kinds of fruits).
Write a program which takes as input a huge array of numbers. This array is
split into n sub-arrays and n threads apply a bubble sort on each of the n
sub-arrays. Lastly, another thread merges the n sorted sub-arrays into one
with the same size as the original array. Of course, the resulting array
should be sorted.
Write a program called ReverseHello.java that creates a thread (let's call it
Thread 1). Thread 1 creates another thread (Thread 2); Thread 2 creates
Thread 3; and so on, up to Thread 50. Each thread should print "Hello from
Thread <num>!", but you should structure your program such that the
threads print their greetings in reverse order.
Write a program in Java to perform the following operations on Matrix
using multithreading. Get the required input matrix from the user and after
that run three threads to perform the following operation.
a. Addition
b. Subtraction
c. Multiplication
given a mxn matrix write a program to print all anti-diagonal elements of matrix