Report cs3 pillos

41
Chapter 4 Arrays And

description

report report dsfsfsdfsdfsd

Transcript of Report cs3 pillos

  • 1. Chapter 4Arrays AndHashtables

2. What is an Array ? 3. What is an Array ?-An array is a systematic arrangement o objects, usually in rows and columns. collection of data items that can be sele by indices computed at run-time, 4. Create an Array or List of Items 5. to create an array that holds a given set of items, separate those items with commas: 6. To create an array of a specific size, use the New-Object cmdlet: 7. To store the output of a command that generates a list, use variable assignment: 8. To create an array that You plan to modify frequently, use an ArrayList, as shown 9. Create a Jagged or Multidimensional Array 10. To create an array of arrays (a jagged array), use the @() array syntax: 11. Access Elements of an Array Access Elements of an Array 12. To access a specific element of an array, use PowerShell's array access mechanism: 13. To access a range of array elements, use array ranges and array slicing: 14. Visit Each Element of an Array 15. To access each item in an array one-by-one, use the Foreach-Object cmdlet: 16. To access each item in an array in a more script like fashion, use the foreach scripting keyword: 17. Sort an Array or List of Item 18. To sort a list of items, use the Sort-Object cmdlet: 19. To sort by your own logic, use a script block as the sort expression. In this example, sorting by the second character: 20. If you want to sort a list that you've saved in a variable, you can either store the results back in that variable, or use the [Array]::Sort() method from the .NET Framework: 21. Determine Whether an Array Contains an Item 22. To determine whether a list contains a specific item, use the contains operator: 23. Combine Two Arrays 24. To combine PowerShell arrays, use the addition operator (+): 25. One common reason to combine two arrays is when you want to add data to the end of one of the arrays. 26. Find Items in an Arra That Match a Value 27. nd all elements that match an item, use the eq, -like, and match comparison operators: 28. more complex comparison conditions, the Where-Object cmdlet lets you find elements ist that satisfy much more complex conditions: 29. Compare Two List 30. To compare two lists, use the Compare-Object cmdlet: 31. Remove Elements from an Array 32. Removing elements from an array using thene, -notlike, andnotmatch operators 33. To actually remove the items from the array, store the results back in the array: 34. Create a Hashtable or Associative Array 35. What are Hash Tables? 36. To define a mapping between labels and items, use a hashtable (associative array): 37. Magnetic Drum Group 8Paul Stephen Gonzaga A magnetic drum differs fromPillos Christian a magnetic disk in that the tracks in Eliezer Quirong which the data is stored are assigned to channels located around the Renedrum, The tracks Tumaneng circumference of the Adrian Panganibam on each channel are grouped into sectors , Some drums are mounted Giselle Tangpuz in a horizontal position, such as the one shown, while others are mounted in a vertical position. As all illustrated in the figure.