Tuesday, 2 June 2020

What is an Array? Why do we use it?

Array: Array is a Data Structure defined by the programmers/users that store data items of the same type sequentially i.e. an array contains data items of the same type and all these items are stored sequentially in memory. It is one of the most common user-defined data types used by the programmers.

In this, size of the array needs to be specified during array initialization.


To access data item at any index, we use array indexing like:

Syntax

type Array-name[index] // Array-name to be declared by user and type is a type of data to be stored

To access data item at index 2, we write:

type Array-name[2].


Array is widely used by the programmers because:

It is easy to implement.

As data items are stored sequentially and so can be accessed by array indexing in O(1) time complexity.


Note: here type refers to what type of data to be stored in the array.


Cheers! Please let me know if you have any queries or feedback on this.



Related common questions: Whats an Array?, Why we use Array?, Use of Array?, What is an Array?


Friday, 18 October 2019

How to bulk update user's manager from import CSV in O365?


Or, updating the bulk user's manager in O365 using CSV file

Steps/Prerequisites:
- Make sure you are corrected with O365 PowerShell session.
- Make sure you have exported Managers list in CSV format using the KB How to export user's managers in O365?

To update the user’s manager execute the below commands:

--------------------------------------------------------------------------------------------------------
$users = Import-Csv -Path "C:\manager.csv"
foreach($i in $users)
{
Set-User -Identity $i.UserprincipalName -Manager $i.Manager
}
---------------------------------------------------------------------------------------------------------

Note: Choose your correct file name and file path in the above-given command

Cheers, please write me back if you have any query or feedback.