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
lutik1710 [3]
3 years ago
7

All users at your site are using the Bash shell. You want to set a variable that will apply to every user and always have the sa

me value. Which files would you place this variable in:
Computers and Technology
1 answer:
podryga [215]3 years ago
4 0

Explanation:

I assume you are on a single host.

To modify the .bashrc for all NEW users, you can edit/modify (with su privilege) the file

/etc/skel/.bashrc

save the file before creating new users.

Be sure to know what you're doing, and test the file before you use it host-wide.

For existing users, you can have them do the modifications/additions individually in case they have already modified their own version.

You might be interested in
Given an array A of size N, and a number K. Task is to find out if it is possible to partition the array A into K contiguous sub
Dennis_Churaev [7]

Answer: First lets solve the Prerequisite part

Lets say we have an input array of N numbers {3,2,5,0,5}. We have to  find number of ways to divide this array into 3 contiguous parts having equal sum. So the output for the above input array will be 2 as there are 2 ways to divide the array. One is (3,2),(5),(0,5) and the other is (3,2),(5,0),(5).

Following are the steps to achieve the above outcome.

  • Let p and q point to the index of array such that sum of array elements from 0 to p-1 is equal to sum of array elements from p to q which is equal to the sum of array elements from q+1 to N-1.  
  • If we see the array we can tell that the sum of 3 contiguous parts is 5. So the condition would be that sum of all array elements should be equal to 5 or sum of each contiguous part is equal to sum of all array elements divided by 5.
  • Now create 2 arrays prefix and postfix of size of input array. Index p of prefix array carries sum of input array elements from index 0 to index p. Index q of postfix array carries sum of input array elements from index p to index N-1
  • Next move through prefix array suppose at the index p of prefix array : value of prefix array == (sum of all input array elements)/5.
  • Search the postfix array for p index found above. Search it starting from p+2 index. Increment the count variable by 1 when the value of postfix array =(sum of all input array elements)/5 and push that index of postfix array into a new array. Use searching algorithm on new array to calculate number of values in postfix array.

Now lets solve the main task

We have an array A of size N and a number K. where A[]= {1,6,3,4,7} N=5 and K=3. We have to find if its possible to partition A into 3 contiguous subarrays such that sum of elements in each subarray is the same. It is possible in this example. Here we have 3 partitions (1,6),(3,4),(7) and sum of each of subarrays is same (1+6) (3+4) (7) which is 7.

Following are the steps to achieve the above outcome.

  • In order create K contiguous subarrays where each subarray has equal sum, first check the condition that sum of all elements in the given array should be divisible by K. Lets name another array as arrsum that will be the size of array A. Traverse A from first to  last index and keep adding current element of A with previous value in arrsum. Example A contains (1,6,3,4,7} and arrsum has {1,7,10,14,21}
  • If the above condition holds, now check the condition that each subarray or partition has equal sum. Suppose we represent sum1 to sum of all element in given array and sum2 of sum of each partition then: sum2 = sum2 / K.
  • Compare arrsum to subarray, begining from index 0 and when it becomes equal to sum2 this means that end of one subarray is reached. Lets say index q is pointing to that subarray.
  • Now from q+1 index find p index in which following condition holds: (arrsum[p] - arrsum[q])=sum2
  • Continue the above step untill K contigous subarrays are found. This loop will break if, at some index, sum2 of any subarray gets greater than required sum2 (as we know that every contiguous subarray should contain equal sum).

A easier function Partition for this task:

int Partition(int A[], int N, int k) // A arra y of size N and number k

{      int sum = 0;    int count = 0;  //variables initialization    

   for(int j = 0; j < N; j++)  //Loop that calculates sum of A

  sum = sum + A[j];        

  if(sum % k != 0) //checks condition that sum of all elements of A should be //divisible by k

   return 0;        

   sum = sum / k;  

   int sum2 = 0;  //represents sum of subarray

  for(int j = 0; j < N; j++) // Loop on subarrays

  {      sum2=sum2 + A[j];  

   if(sum2 == sum)    { //these lines locates subarrays and sum of elements //of subarrays should be equal

       sum2 = 0;  

       count++;  }  }  

/*calculate count of subarrays whose

sum is equal to (sum of complete array/ k.)

if count == k print Yes else print No*/

if(count == k)    

return 1;  

   else

   return 0;  }

6 0
3 years ago
Which of the following kinds of computing refers to an environment of servers that house and provide access to resources users a
AveGali [126]

Answer:

Cloud is the correct answer for the above question.

Explanation:

Missing Information:

    The option is missing in the question and the question suggests to choice. The option can be liberated, cloud, disperse, digital for this question in which cloud is the correct answer.

Detailed Explanation:

  • The cloud is used to store a large amount of data or information for varies users and anyone can store or modify or delete the information from anywhere.
  • This service takes money from the user and gives service to modify, edit or add the data from anywhere using the internet. When a user wants to take the service of the cloud then he needs to contact the cloud service provider, then pays money to them and then he can enjoy the service.
  • The above question wants to ask about the term which is a vast environment of databases that provide access to the users to store and mane the data and that is the cloud which is the correct answer for the above question.
7 0
3 years ago
_____ is an example of a professional networking site where you keep in touch with business contacts.
WINSTONCH [101]

Answer:

"LinkedIn" is the correct answer for the above question.

Explanation:

  • LinkedIn is used to build a connection between people and communicate. But it is used to connect only business type contacts.
  • So, when any user wants to make any business type of contacts, then he can do this with the help of making an account on LinkedIn and then add the business people on it.
  • The above question asked about the networking site which is used to connect the business contacts. This site is known as LinkedIn.
8 0
2 years ago
A _______________ is a field that contains data unique to a record.
Andru [333]

A primary key is a field that contains data unique to a record

8 0
3 years ago
Laptop computers, personal digital assistants, and cellular phones were all readily accepted and diffused in U.S. markets where
astra-53 [7]

Answer: Compatibility

Explanation:

 According to the question, the given products are offering compatibility with the customers needs and the priorities of the consumers. The customers comparability means the degree of the product that fit between customers expectation and the capability of serving by the operation team.

The customers expectation mainly reflected both the present and the past evaluation of the products and the user experience. The compatibility of the customers needs is to meet the quality, value  and the service of the product.

8 0
3 years ago
Other questions:
  • What microsoft operating systems started the process of authenticating using password and username
    14·1 answer
  • A ________ is a system of hardware and software that stores user data in many different geographical locations and makes that da
    14·1 answer
  • What was the attitude of the U.S. Senate towards the Treaty of Versailles, and why did they have that attitude?​
    9·1 answer
  • Blank determines the overall brightness or darkness of an entire image
    5·1 answer
  • Using a caesar cypher with an offset of three characters (a -&gt; d, b -&gt;e, ...., z -&gt; c), what would be the correct cyphe
    6·1 answer
  • Which hexadecimal number is equivalent to the decimal number 11?
    13·1 answer
  • Where does the list of incoming mail appear in gmail
    13·2 answers
  • Let’s say you’re having trouble locating a file on your computer. Which of the following are good places to look for the file?
    14·1 answer
  • Which statement about intellectual property is true? (CSI-7.6) Group of answer choices It is okay to use code you find on the in
    14·1 answer
  • Posts that you delete
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!