|
Mass Producing Solar Arrays
2009-03-30 02:32:00 I have this idea, and while I have not done an exhaustive search, I think it might be somewhat novel: Solar Arrays might be more affordable, acceptable and adaptable if they got off the roof and onto a pole. The pole could be set in a concrete base, so all installations are the same, maximizing eco
Some Useful Array Manipulation Functions in PHP
2008-05-09 08:49:00 Please read Arrays and Array Processing in PHP for an introduction to arrays in PHP. You may also want to read Sorting Arrays in PHP…Some Sorting Functions and Other Ways of Initializing Arrays in PHP. shuffle() Function This function can shuffle or randomly arrange the elements of an arrays. It takes an arrays as argument and manipulates on the original array passed. $ar=array(1,2,3,4,5,6,7); shuffle($ar); //$ar=array(7) { [0]=-> int(5) [1]=>&-nbsp; //int(4) [2]=> int-(3) [3]=> int(1)&n-bsp; //[4]=> int(6) [5]-=> int(7) [6]=>- int(2) } //will be different&n-bsp;for each run As you can see the elements of the array ‘$ar’ passed have been re-ordered randomly by the shuffle() function. This function can be useful when we’d like to have a random element from an array and the order of the elements is not im...
Other Ways of Initializing Arrays in PHP
2008-05-08 12:04:00 We had discussed about Arrays in PHP in the post Arrays and Array Processing in PHP. We learnt how we can simply initialize an array by giving values to different indices or using the ‘array’ construct. Besides those methods there are a few others that you should know, which is the topic of this post. Creating Sequential Arrays There are times when you want to store sequence or pattern of values in an array. For that task range() function would prove to be very helpful. Suppose if we want to have an array having ten elements from 1 to 10. We can use the following tedious method: $ar[0]=1; $ar[1]=2; $ar[2]=3; ? ? $ar[9]=10; or the range function like: $ar=range(1,10); the above line of code creates an arrays same as the one above. This function can also be use with the optional third argument to set the step between values. Eg. $ar=range(1,10,2); //$ar={1,3,5,7,9} range() function also works with character, s...
Sorting Arrays in PHP?Some Sorting Functions
2008-05-07 11:59:00 Oh, so you want to learn how to sort arrays in PHP. But, did I tell you that PHP has inbuilt sorting functions. Well, I’ve now! So this post will not be anything but discussion on those sorting functions. Let’s look at them without wasting any more time. sort() Function This function, as the name suggest can be used to sort single dimensional arrays in ascending order. PHP is intelligent enough to also sort string arrays very well besides numerical arrays. $ar=array(1,11,38,65,2,99); sort($ar); //gives array(6) {&nb-sp;[0]=> int(1) [1-]=> int(11) [2]=&g-t; //  -;int(38) [3]=> int-(56) [4]=> int(65)- [5]=> int(99)&nbs-p;} The optional second argument if specified can be SORT_REGULAR (default), SORT_NUMERIC or SORT_STRING. It can be used to explicitly tell the sort function the way you want the arrays to be sorted. Most commonly num...
Smarty Variable: Associative Arrays
2008-05-02 19:42:00 tutorial php about associative arrays for smarty template
Arrays and Array Processing in PHP
2008-04-30 08:43:00 Arrays are a set of variables of the same data type. If you’ve ever programmed before you should be knowing about it. but PHP takes arrays to the next level by providing so many useful in-built features to operate on them, let’s see some of them. Types of Arrays You should be familiar with the following type of array: $ar[0]=1; $ar[1]=10; It is an example of numerically indexed array since numerical values are used as indices to reference different elements of the array. One other type of array that PHP supports is those having string indices which sometimes may make indexing more meaningful. $temp['jan']=21; $temp['feb']=23; $temp['mar']=24; This type of array is also called Associative Arrays. As is obvious, the array above should most probably be having temperatures of different months. Had it been numerically indexed, it wouldn’t have made that much sense. So you can use these types of arrays to make indexing ...
PHP : Arrays
2008-03-31 20:25:00 Olá a Todos. Bem Vindos a mais uma rubrica de como programar PHP. Os que não se interessam por isto já devem andar a dar meia volta e sair do blog, porque os posts são realmente poucos e agora que voltei ao meu “trabalho” tenho um tempo que não dá para nada. Por isso agora ...
By: LusaDigital
PHP : Arrays
2008-03-31 20:25:00 Olá a Todos. Bem Vindos a mais uma rubrica de como programar PHP. Os que não se interessam por isto já devem andar a dar meia volta e sair do blog, porque os posts são realmente poucos e agora que voltei ao meu “trabalho” tenho um tempo que não dá para nada. Por isso agora aqui um Off Topic, quem se quiser candidatar á entrada no Blog como Blogger só precisa de me contactar pelo formulário de contacto do blog ou pelo admin@lusadigital.com Mas agora vamos ao PHP, hoje com as Arrays. Uma Array é um conjunto de dados guardados numa variável, e é das funções mais importantes que existem, mas é também das partes mais fáceis desta linguagem. Existem varias maneiras de definir uma array, mas a mais fácil vai ser assim: Ex: $cores=array(); Agora que já definimos a Array vamos inserir os dados que queremos desta maneira: $cores[0]=”Azul”; $cores[1]=”Verde”;- e assim sucessivamente. Também podemos fazer da seguinte maneira: $cores = a...
By: LusaDigital
Convert Dates to Arrays using Array Function
2008-03-03 03:33:00 Convert Dates to Arrays using VBAHere is the way to convert dates to array. Replace the normal quotes used for string to hash (#).Function Convert_Date_Into_Array()Dim arDatesarDates = Array(#1/1/2008#, #2/1/2008#, #3/1/2008#)For i = 1 To UBound(arDates) MsgBox arDates(i)Next iEnd Function The Array Function returns a Variant containing an array. Syntax Array(arglist) The required arglist argument is a comma-delimited list of values that are assigned to the elements of the array contained within the Variant. If no arguments are specified, an array of zero length is created.
Two Dimensional Arrays in JavaScript
2008-02-09 19:07:00 JavaScript gives you One-Dimension Array creation feature, But if we want to perform 2d Array calculation then we will have to create the 2d array then JavaScript does not have any ready made function for 2D Array but we can create 2D Array through JavaScript programming. This tutorial will guide you through creating an 2d ...
By: Techie Zone
Japan?s space agency planning space-based solar power arrays
2008-02-09 00:00:00 We've seen some pretty out there solar installations, but JAXA, the Japanese space agency, is about to get really far out with its latest project: a space-based solar array that beams power back to Earth. The agency is set to begin testing on the microwave power transmission system on February ...
HP Introduces Advanced Family of Disk Arrays at Entry-level Prices
2008-02-07 17:59:00 HP today introduced a new family of entry-level disk arrays with enterprise-class features that can help customers more effectively centralize storage to lower costs, increase administrator efficiency and reduce business downtime. The HP StorageWorks 2000 Modular Smart Array (MSA2000) family is composed of low-cost Fibre Channel and iSCSI disk arrays for highly available, storage area networks ...
By: Blog Hipp
HP Introduces Advanced Family of Disk Arrays at Entry-level Prices
2008-02-06 14:32:00 HP today introduced a new family of entry-level disk arrays with enterprise-class features that can help customers more effectively centralize storage to lower costs, increase administrator efficiency and reduce business downtime. The HP StorageWorks 2000 Modular Smart Array (MSA2000) family is composed of low-cost Fibre Channel and iSCSI disk arrays for highly available, storage area networks
ARRAYS
2008-02-04 10:37:00 Good Morning Everyone.Am sure you have been practicing on our last tutorial.We talked about; -Installing Necessary applications or softwares to make our lesson easier.Those software are PHP interpreter,MYSQL Database and Apache server. Today,we will be looking at ARRAYS. Arrays are group of items sharing the same characteristics such as CAR MODELS,BASEBALL TEAM and TYPES OF HOUSES.Basically its used to group many variables and stored in to another variable.CREATING ARRAYSArrays can be created like this$names[0]="Peter"; // Numerical key$names = array (0 => "julie", 1 => "peter",2 => "mark"); //Numerical key $names["Friend"]="Sammy"; //words as index key. You can see from the above examples the various ways arrays are created.The first one has a numerical key which can be referenced like thisecho $names[0];While,the second one can be referenced, the same way as the first.But the only difference between the first two and the third one,that is the one with a word as its key,is that ins...
By: TOXIC SCRIPTS
The mother of all solar arrays!
2007-12-04 18:02:00 Europe is considering a £200 billion plan for a string of giant solar power stations along the Mediterranean desert shores of northern Africa and the Middle East! More than a hundred of the generators, each fitted with thousands of huge mirrors, would generate electricity to be transmitted by undersea cable to Europe and then distributed ...
The mother of all solar arrays!
2007-12-04 18:02:00 Europe is considering a £200 billion plan for a string of giant solar power stations along the Mediterranean desert shores of northern Africa and the Middle East! More than a hundred of the generators, each fitted with thousands of huge mirrors, would generate electricity to be transmitted by undersea cable to Europe and then distributed ...
The mother of all solar arrays!
2007-12-04 18:02:00 Europe is considering a £200 billion plan for a string of giant solar power stations along the Mediterranean desert shores of northern Africa and the Middle East! More than a hundred of the generators, each fitted with thousands of huge mirrors, would generate electricity to be transmitted by undersea cable to Europe and then distributed across the continent to European Union member nations, including Britain. Billions of watts of power could be generated this way, enough to provide Europe with a sixth of its electricity needs and to allow it to make significant cuts in its carbon emissions. At the same time, the stations would be used as desalination plants to provide desert countries with desperately needed supplies of fresh water. Last week Prince Hassan bin Talal of Jordan presented details of the scheme - named Desertec - to the European Parliament. ‘Countries with deserts, countries with high energy demand, and countries with technology competence must co-operate,&r...
The mother of all solar arrays!
2007-12-04 18:02:00 Europe is considering a £200 billion plan for a string of giant solar power stations along the Mediterranean desert shores of northern Africa and the Middle East! More than a hundred of the generators, each fitted with thousands of huge mirrors, would generate electricity to be transmitted by undersea cable to Europe and then distributed across the continent to European Union member nations, including Britain. Billions of watts of power could be generated this way, enough to provide Europe with a sixth of its electricity needs and to allow it to make significant cuts in its carbon emissions. At the same time, the stations would be used as desalination plants to provide desert countries with desperately needed supplies of fresh water. Last week Prince Hassan bin Talal of Jordan presented details of the scheme - named Desertec - to the European Parliament. ‘Countries with deserts, countries with high energy demand, and countries with technology competence must co-operate,&rsq...
Inflatable Solar Arrays Cost Up to 25X Less
2007-11-29 16:26:00 From EcoGeek: If you've been following my work here, you might have noticed I have a thing for eco-friendly gadgets. Maybe it's the environmentalist in me screaming to get out. This time around, the folks at EcoGeek have found an intriguing way to do solar power: with inflat
On ColdFusion 7 Arrays
2007-11-12 15:25:00 At Ben Nadel’s Blog, which I enjoy reading simply because he has a similar passion to me (digging into how and why it works under the hood), he talked about calling Java functions in ColdFusion that require an actual value array instead of a vector, which is what ColdFusion’s arrays are based on. He has ...
By: Adam-Blog
Microphone Arrays: Digital Microphones
2007-11-10 02:54:00 Below is part 2 of an audio series by Windows Vista Sound team Program Manager Richard Fricks, the first being Richard's piece on Using a microphone array to enhance sound capture. This follow-on article details how to get more out of your PC by using a digital microphone. The digital microphone is a perfect fit for Windows Vista's microphone array technology. Digital microphones have been around for years, but until recently, the ability to integrate such technology into an everyday laptop computer at an affordable price has not. Did I mention they are incredibly compact? Here is a picture of a bottom-port Akustica digital microphone: Akustica AKU2000 This is a great example of a high quality, cost-effective digital microphone that is easily integrated into a laptop PC. There are some unique characteristics of this particular microphone that warrant mention. First of all, Akustica has a unique fabrication process that allows them to incorporat...
Microphone Arrays: Digital Microphones
2007-11-10 02:54:00 Below is part 2 of an audio series by Windows Vista Sound team Program Manager Richard Fricks, the first being Richard's piece on Using a microphone array to enhance sound capture. This follow-on article details how to get more out of your PC by using a digital microphone. The digital microphone is a perfect fit for Windows Vista's microphone array technology. Digital microphones have been around for years, but until recently, the ability to integrate such technology into an everyday laptop computer at an affordable price has not. Did I mention they are incredibly compact? Here is a picture of a bottom-port Akustica digital microphone: Akustica AKU2000 This is a great example of a high quality, cost-effective digital microphone that is easily integrated into a laptop PC. There are some unique characteristics of this particular microphone that warrant mention. First of all, Akustica has a unique fabrication process that allows them to incorporat...
Article: Java-Data types, Variables, and Arrays
2007-10-31 10:27:00 uCertify has sent us this article which is useful for the SCJA certification exam. The article helps you to understand the Java types, variables and arrays, a topic for CX310-019 exam. Java-Data types, Variables, and Arrays Java is a robust language. One of the factors, which makes Java robust is the fact that it is a strongly ...
By: Exam Directory
Array of Functions
2007-07-28 08:09:00 In the article Pointers to Function, we saw how pointers can be made to point at functions and hence can be used to invoke them. By far the most important use of pointers to functions is to have arrays of functions. This can be achieved as stated below You already know that we can have arrays of pointers and pointers can be made to point at functions. So combining both we can have array of pointers to functions put differently, we can have array of functions. The example program below demonstrates how we can have array of functions; please note that this concept is mostly used in writing compilers and interpreters, so you shouldn’t expect the program to do anything serious or useful! // Program to demonstrate // array of functions #include<iostream.h> // -- FUNCTION PROTOTYPES -- void func1(); void func2(); void func3(); void func4(); void func5(); // -- ENDS -- void main() { // notice the prototype void (*ptr[5])();...
Merging Two-Dimensional Arrays (Matrices)
2007-07-16 11:54:00 In the article Merging One Dimensional Arrays, we discussed how to merge one-dimensional arrays, in this article we will be discussing about the merging of two-dimensional arrays. Merging as you know is the process of combining two similar things. In the context of arrays, it means to form a big array from two smaller arrays which has all the elements from both the arrays. In case of one-dimensional arrays there is only one way in which two arrays can be merged but in case of two-dimensional arrays there are two ways. Suppose, we have the following two 2d arrays (matrices): mat1={ {1, 2, 3}, {4, 5, 6}, {7, 8, 9} } and mat2={ {10, 11, 12}, {13, 14, 15}, {16, 17, 18} } then they can be merged in the following two ways: merge_row={ {1, 2, 3, 10, 11, 12}, {4, 5, 6, 13, 14, 15}, {7, 8, 9, 16, 17, 18} } merge_col={ {1, 2, 3}, {4, 5, 6}, {7, 8, ...
Merging One Dimensional Arrays
2007-07-10 08:08:00 Merging of two arrays means to form one big array from two small arrays, which has element from both the arrays linearly. Ex. if we have the following two arrays: array1 [5] = {1,2,3,4,5} array2 [5] = {6,7,8,9,10} and we merge these two arrays to form an array merge_array, then it would have these elements: merge_array [5] ={1,2,3,4,5,6,7,8,9,10} So, from this example we understand that the array which will hold the merged elements should have a dimension equal to the sum of the dimensions of the two discrete arrays. It is no big deal to merge two arrays, we just need to sum up the dimension of the arrays, and then allocate an array having that dimension. Below is the example program that illustrates this. Please go through the program to understand every bit of it. It is accompanied with enough comments to make everything clear. While two arrays has been merged here, you can easily modify it to merge as many arrays as you wish. // -- Array Merging -- //...
Casting Arrays and Collection.toArray(T[] a)
2007-07-10 00:00:00 I ran into a problem today when attempting to convert a List to an Array. I kept getting a java.lang.ClassCastException when trying to cast an Object[] to a Donkey[]. The suspect code was as follows: List myListOfDonkeys = myObject.getMyListOfDonkeys();- Donkey[] donkeys = (Donkey[])myListOfDonkeys.toArr-ay(); This did not work and resulted in a java.lang.ClassCastException. After some experimenting, I changed ...
By: Java Donkey
Sorting Two-Dimensional Arrays
2007-07-08 07:56:00 Do you know how a 2D array is stored in the memory while the memory is only one-dimensional? The answer is simple, all the arrays are stored linearly in the memory, be it 2D array or 3D, only the representation is such that to make it easy to reference. Therefore, if a two-dimensional array has the following elements: 1 2 3 4 5 6 7 8 9 in the memory, it will be like this: 1 2 3 4 5 6 7 8 9 just because memory is linear, and cannot have dimensions. It is the language that represents 2 D arrays as such while in the memory it is always linear. This property of 2D arrays will be used to sort them, because sorting linear data is much easier. We don’t need much discussion on this, so here is the example program, please read the comments where all things are elaborated // --Sorting Program-- // ------------------- // Example Program to sort // 2D array using linear // representation of the array #include<iostream.h> #define MAX 3 void main(v...
Insertion and Deletion of elements in a Sorted Array
2007-07-01 08:37:00 In the article Insertion and Deletion of elements in an Array, we saw how data is inserted and deleted in an unsorted array. In that case, we needed two information, the element as well as the position, for insertion while for deletion we needed the position. In the case of sorted arrays insertion and deletion takes pace in a slightly different way. The following example will clarify this: Suppose we have the following array: arr[5]={1,2,3,4,5} And, we need to insert the element 6, so where it should be inserted? We can?t insert it at any place because then the array might not remain sorted. Therefore, we let the program to automatically calculate the position suitable for the new element, so that the array remains sorted even after insertion. Now, arr[5]={1,2,3,4,6} Now, suppose we wish to delete the element 6, in this case we don?t use the position for deletion because we don?t know where the element was placed by the program, so rather than referencing the position for deletion, ...
Insertion and Deletion of elements in an Array
2007-06-30 07:57:00 Suppose you are storing temperature data for a few months and you forgot to store the temperature of a particular day (say 5th day) then you need to INSERT that temperature after the 4th element of the array and in the other case if you accidentally stored duplicate data then you need to DELETE the duplicate element. Apart from these simple examples, there are many other uses of insertion and deletion The array to which the element is to be inserted or deleted can be of two types unordered (unsorted) and ordered (sorted). Here we will be discussing about the insertion and deletion of element in an unordered or unsorted array. For insertion in these types of arrays, we need to have two information, the element to be inserted and the position to which it will be inserted. For deletion, we only need the position. Suppose we have the following array: arr[5]={5,7,2,1,3} And we need to insert the element 6 at the 2nd position, after insertion: arr[5]={5,6,7,2,1} Notice how the last elemen...
Algebra of Matrices (2D Arrays) Part II
2007-06-29 11:58:00 As you know from the previous article, matrices are 2D arrays. In the previous article, we saw how two matrices are added and subtracted. In this article, we will continue our discussion on algebra of two matrices by discussing how two matrices are multiplied. Multiplication of two Matrices Multiplication of two matrices mat1[a x b] and mat2[p x q] is only valid if b=p. While there are many algorithms by which two matrices can be multiplied, here I?ll give you the most simple algorithm. Others are used when efficiency matters. Algorithm for Multiplication of two Matrices Suppose, Two 2D arrays to be mat1 [p][p] and mat2 [p][p] having same number of rows and columns. A third 2D array, mul [p][p] to store the result. Here is the algorithm: FOR I = 0 TO (p-1) FOR J = 0 TO (p-1) mul [I][J] = 0 FOR K = 0 TO (p-1) mul [I][J] += (mat1 [I][K] * mat2 [K][J]) END OF INNER LOOP END OF OUTER LOOP Below is a example program which illustrates the multiplication of two ma...
Algebra of Matrices (2D Arrays)
2007-06-26 07:58:00 In the programming sense, Matrices are Two Dimensional or 2D arrays. Just as Matrices have rows and columns, similarly 2D arrays too have rows and columns. There are many mathematical operations like addition, subtraction, multiplication etc. which can be performed on matrices, and therefore to 2D arrays also. In this article, we will be discussing about the addition and subtraction of two 2D arrays (Matrices). Addition of two Matrices (2D arrays) For addition of two matrices both the matrices must have the same dimension. Ex. if matrice one has the dimension p x q then matrice two must have the dimension p x q. In the addition process, each of the element of the first matrice is added to the corresponding element of the second matrice and result is stored in the third matrice having the same dimension (i.e. p x q). Below is the algorithm for adding two matrices. Algorithm for adding two Matrices Suppose, Two 2D arrays to be mat1 [p][q] and mat2 [p][q] having p rows and q columns...
Binary Search: A Method of Searching
2007-06-25 12:41:00 Binary Search method is popular for searching a specific item in an ordered array (sorted). It can perform the search in minimum possible comparisons, but it needs the array to be sorted in any order. Practically, it is used when the data is itself sorted initially or needs to be sorted for other activities also. This is because you don?t want to first sort the data and then use binary search, in that case use of linear search would be practical. Binary Search Algorithm Suppose, The array to be AR[SIZE] having SIZE number of elements. L is the index number of the lower element. We take it to be 0. U is the index number of the upper (last) element. It will be (SIZE-1). ITEM is the data that needs to be searched. beg, last and mid are variables of type int(eger). Here is the algorithm: LET beg = L AND last = U REPEAT STEPS 3 THROUGH 6 TILL beg<=last mid = ( (beg+last)/2) IF AR[mid] = ITEM THEN ITEM IS AT POSITION mid BREAK THE LOOP IF AR[mid] <...
Sorting an Array using Bubble Sort
2007-06-25 12:39:00 In this article we will see how an array can be sorted using Bubble Sort Technique. Sorting, as you know, is the method of arranging the elements of an array in an order (ascending or descending). The basic idea behind bubble sort method of sorting is to keep on comparing adjoining elements of the array from the first until the last and interchanging them if they are not in proper order. The whole sequence is repeated several times when the array becomes sorted. Bubble Sort Algorithm Suppose, The array (to be sorted) to be AR[SIZE] having SIZE number of elements. L is the index number of the lower element. We take it to be 0, since the whole array has to be sorted. U is the index number of the upper (last) element. It will be (SIZE-1). Here is the algorithm of sorting the array using bubble sort FOR I = L TO U FOR J = L TO (U-1) IF AR[J] > AR[JA1] THEN temp = AR[J] AR[J] = AR[J+1] END OF INNER LOOP END OF OUTER LOOP Now that you know the algorith...
Classes & Objects: Dynamic Memory Allocation
2007-06-24 08:19:00 Just as variables of pre-def data type are dynamically allocated, same way objects of class can also be dynamically allocated. While the method of doing this is no different but the way members of such objects are accessed is a bit different. This is why I thought of writing a separate article on it. Before discussing any further, look at the program below: // Example Program in C++ #include<iostream.h> // class class myclass { // by default everything is // private to the class int var1, var2; void add(); public: int sum; void input(int,int); }; // function definitions void myclass::input(int a, int b) { var1=a; var2=b; add(); } void myclass::add() { sum=var1+var2; } // main function starts void main(void) { myclass obj; // simple object myclass *pobj; // pointer // of type 'myclass' pobj=&obj; // now 'pobj' pointer // points to the object 'obj' of // class 'myclass...
The Scoop On RAID Hard Drive Arrays
2007-06-12 22:57:00 If you have ever wondered what a RAID array is or how it works, I have stumbled upon a very good article pointing out everything from the very basics of RAID arrays to the various types of configurations available today. You’ll also learn something that has actually been puzzling me for awhile: how can RAID arrays recover their data completely when one or two drives fail? Understanding RAID Tags: hard drives, RAID, self learning
Arrays Vs Collections
2007-06-05 15:51:00 Arrays Vs CollectionsAn array list declares the type of elements it holds.A collection stores elements as objects.An array instance cannot be grow or shrink. It size remains constant.Collections can grow dynamically.We cannot create a read only array.Collections can be used in Read-Only modes. The collection class provides a ReadOnly method for this.
By: Learn C sharp
Other Arrays
2007-05-30 08:30:00 Char ArraysWhat is a char Array?A character array contains characters as array elements. Each character in the character array can be accessed using the array index. This is much like the any other array like int. Here, when assigning each character should be inside a single quote. 'a' like this.Declaring a char array:Char Arrays can be declared and initialized in the following pattern // One way of declaring the char array without providing the sizechar[] name = new char[4] { 'p', 'o', 'g', 'o' }; //Here name is implicitly assigned 5 as its size.char[] name = new char[] { 'h', 'e', 'l', 'l', 'o' }; Example showing how to read and write the values of a char array.static void Main(string[] args) { //Here name is implicitly assigned 5 as its size.char[] name = new char[] { 'h', 'e', 'l', 'l', 'o' }; int x=0; //Loop to write hello in a pattern...
By: Learn C sharp
Summary Arrays
2007-05-30 08:09:00 Topics Covered:Introduction to arrays.System.arrays Methods and Properties.The array class.Using params.Passing arrays and array elements to methods.Passing arrays as value and as refrence.Common Errors in arrays.MultiDimensional arrays.Jagged Arrays.Other ArraysImportant Notes.
By: Learn C sharp
Jagged Arrays
2007-05-30 06:30:00 What is a jagged Array?A jagged array is really an array of arrays. To create a jagged array, you declare the array of arrays with multiple sets of parentheses or brackets and indicate the size of the jagged array in the first set of brackets (parentheses). The following example demonstrates how to create a simple jagged array:Declaring a jagged array:Jagged Arrays can be declared and initialized in the following pattern // Declares an array of 3 arraysstring[][] Families = new string[3][]; // Initializes the first array to 4 members and sets valuesFamilies[0] = new string[] {"Smith", "Mom", "Dad", "Uncle Phil"}; // Initializes the second array to 5 members and sets valuesFamilies[1] = new string[] {"Jones", "Mom", "Dad", "Suzie", "Little Bobby"}; // Initializes the third array to 3 members and sets valuesFamilies[2] = new string[] {"Williams", "Earl", "Bob"}; Example to read write the values of a two dimensional ar...
By: Learn C sharp
MultiDimensional Arrays
2007-05-28 15:47:00 Two-Dimensional ArraysDeclaring a two-dimensional array:int[ , ] arr;We know that from our previous topics how to declare an array. To remind us again the square brackets that are part of the declaration identify the rank, or the number of dimensions, for the array; in this case the rank is 2.Instantiating and assigning arrays:Once an array is declared we can immediately fills its contents using a comma delimited list of items enclosed within a pair of curly brackets e.g.int[ , ] arr = int [ 2, 2 ] ;//Here a two dimensional array arr is declared having two rows and two columns OR having 4 cells. The rank of this array is two. The length property of this array will return us 4.Arrays can be initialized in the following patternint [ , ] arr = { {1, 2}, {3, 4} };Here the cells 0, 0 are assigned the value 1; cells 0, 1 value 2 and so on?Example to read write the values of a two dimensional array.static void Main(string[] args){Console.WriteLine(" Understanding MultiDimension Arr...
By: Learn C sharp
Passing Arrays and Array Elements to Methods
2007-05-25 04:56:00 To pass an array to a method we need to pass the array name without the brackets, e.g if we have an array cars declared as:int[] cars = new cars[4];to pass this array to a method we need to call the method and send the array name as its parameter.e.g fun(cars)passes the reference of array cars to method fun. Every array object "knows" its own length (and makes it available via its Length property). Thus, when we pass an array object's reference to a method, we need not pass the array length as an additional argument.we assume the code in method fun is :public void fun( int[] c)The parameter list must contain an array parameter to hold the passed refrence.The method call passes array cars's reference, so when the called method uses the array variable c, it refers to the same array object as cars in the calling method.When an argument to a method is an entire array or an individual array element of a reference type, the called method receives a copy of the reference. However, when a...
By: Learn C sharp
Arrays Imp note
2007-05-24 11:07:00 When a method receives a reference-type parameter by value, a copy of the object's reference is passed. This prevents a method from overwriting references passed to that method. In the vast majority of cases, protecting the caller's reference from modification is the desired behavior. If you encounter a situation where you truly want the called procedure to modify the caller's reference, pass the reference-type parameter using keyword refbut, again, such situations are rare.
By: Learn C sharp
3D solar cells built from arrays of millions of tiny vertical carbon nanotu
2007-04-18 22:31:00 Filed under: Emerging Technologies, Solar I feel the need to level with you, dear reader, and let you know that much of the technical bits in this article are over my head. But, let me do my best to describe what I think is going on here… Like a standard photovoltaic solar cell, a wafer is ...
PHP - Arrays
2007-03-20 00:00:00 An array is a data structure that stores one or more values in a single value. For experienced programmers it is important to note that PHP's arrays are actually maps (each key is mapped to a value).
Detailed Guide On Arrays In PHP
2007-02-11 23:10:11 Detailed Guide On Arrays in Php ...Here is yet another article of Fast PHP Articles Series. Today we are going to discuss ARRAYS. We will learn its syntax, its different types, the different built-in array functions that help to perform different tasks related to arrays quickly and different practical examples explaining the use of arrays in PHP. |



