Answer:
VBScript is given below
Explanation:
As per the given details the program should be as follows:
if (WScript.Arguments.Count = 0) then
WScript.Echo "Missing parameters"
else
'Declare the File System object to be used
Dim fso
'Declare the path variable to be used for storing the path entered by user
Dim path
'Create the File System object using the FileSystemObject class
Set fso = CreateObject("Scripting.FileSystemObject")
'initialize the path
path = WScript.Arguments(0)
'Check if the path exists
exists = fso.FolderExists(path)
if (exists) then
'declare a constant of size 1024 since 1024 bytes = 1 Kb
CONST bytesToKb = 1024
'Print the selected path
WScript.Echo "Selected Path " & WScript.Arguments(0)
'get the folder on path
Set inDir=fso.GetFolder(path)
'Create the file to store the output results
Set outFile = fso.CreateTextFile("Results.txt",True)
'Print the name, date created and size of each file and store the same in output file
For Each objFile in inDir.Files
'Calculate the padding needed for File Name. Assuming the maximum length of file name is 40 characters
namePadding = 40 - Len(objFile.Name)
'Calculate the padding needed for Date
datePadding = 30 - Len(objFile.DateCreated)
'Add spaces to file Name so that same can be printed in a tabular format
fileName = objFile.Name & Space(namePadding)
'Add spaces to date so that same can be printed in a tabular format
dateCreated = objFile.DateCreated & Space(datePadding)
'Print the details on screen
Wscript.Echo fileName & dateCreated & CINT(objFile.Size / bytesToKb) & "Kb"
'Store the details in ouput file with a newline character at the end
outFile.Write fileName & dateCreated & CINT(objFile.Size / bytesToKb) & "Kb" & vbCrLf
Next
'Close the output file once the loop ends
outFile.Close
else
'Print a message if the path does not exist
WScript.Echo "Invalid Path Entered"
end if
end if
In this exercise we have to use the programming knowledge to program from python in this way, so:
The code to solve this programming can be found in the image attached below.
As per the given details the program should be as follows:
if (WScript.Arguments.Count = 0) then
WScript.Echo "Missing parameters"
else
'Declare the File System object to be used
Dim fso
'Declare the path variable to be used for storing the path entered by user
Dim path
'Create the File System object using the FileSystemObject class
Set fso = CreateObject("Scripting.FileSystemObject")
'initialize the path
path = WScript.Arguments(0)
'Check if the path exists
exists = fso.FolderExists(path)
if (exists) then
'declare a constant of size 1024 since 1024 bytes = 1 Kb
CONST bytesToKb = 1024
'Print the selected path
WScript.Echo "Selected Path " & WScript.Arguments(0)
'get the folder on path
Set inDir=fso.GetFolder(path)
'Create the file to store the output results
Set outFile = fso.CreateTextFile("Results.txt",True)
For Each objFile in inDir.Files
namePadding = 40 - Len(objFile.Name)
'Calculate the padding needed for Date
datePadding = 30 - Len(objFile.DateCreated)
fileName = objFile.Name & Space(namePadding)
dateCreated = objFile.DateCreated & Space(datePadding)
'Print the details on screen
Wscript.Echo fileName & dateCreated & CINT(objFile.Size / bytesToKb) & "Kb"
'Store the details in ouput file with a newline character at the end
outFile.Write fileName & dateCreated & CINT(objFile.Size / bytesToKb) & "Kb" & vbCrLf
Next
'Close the output file once the loop ends
outFile.Close
else
'Print a message if the path does not exist
WScript.Echo "Invalid Path Entered"
end if
end if
See more about python at brainly.com/question/26104476
Write an abstract superclass encapsulating a college applicant:
A college applicant has two attributes: the applicant’s name and the college the applicant is applying to.
This class has two non-abstract subclasses: one encapsulating an applicant for undergraduate school, and the other encapsulating an applicant for graduate school.
An applicant for undergraduate school has two attributes: a SAT score and a GPA. An applicant for graduate school has one additional attribute: the college of origin.
It also has a method that returns "from inside" if the college of origin is the same as the college applied to; otherwise, it returns "from outside".
You also need to include a class to test two classes.Java please.
Answer:
The code snippet file is attached. There are four files:
Abstract Applicant ClassThe Graduate ClassThe Undergraduate classThe TestApplicantClassThe code is well commented and explanatory.
Explanation:
Which of the following is the definition of registration authority ( RA)?
a. The process of applying an algorithm to cleartext (or plain text) data, resulting in a ciphertext.
b. The certificate authority’s list of invalid certificates.
c. The concept of ensuring that an originator cannot refute the validity of a statement or document.
d. An entity that is responsible for the registration and initial authentication of certificate subscribers.
Answer:
The correct answer following question will be Option D.
Explanation:
An authority that verifies the user requests for digital certificates and tells to the CA (Certificate authority) to issue the certificates, known as Registration Authority (RA). The digital certificate contains a key named "public key" which is used to encrypt and decrypt digital signatures.
Hence, registration authority, it's an entity that is responsible for the authentication of certificate and registration and the other given options are not relatable to this authority.
So, option D is the correct answer.
#include ... void sig_handler(){ static int i = 1; printf("Beep\n"); alarm(i); ++i; } int main(){ struct sigaction sa; sa.sa_flags = 0; sa.sa_handler = sig_handler; if(sigaction(SIGALRM, &sa, NULL) != 0){ printf("Failed to bind handler.\n"); exit(1); } printf("Going into an infinite loop.\n"); alarm(1); while(1); return 0; }
Suppose the above program is run for 7.5 seconds after it prints "Going into an infinite loop". The program is run multiple times where the "system load" from other processes sharing the cpu will vary from none to many other processes. Which best characterizes how many times "Beep" is printed?
Answer:
Explained below
Explanation:
After the compiling the program it prints "Going to infinite loop" after that i started the timer till 4.5 sec. The program prints more than 4 beeps nearly 6-7 beep messages were printed.
The number "Beep" would always be strictly greater than 4.
Hence, if the above program is run for 7.5 seconds after it prints "Going in an infinite loop", it will print Beep for about 9-10 times. Hence, the number will always be greater than 7