Quadrillio's Posts
Nairaland Forum › Quadrillio's Profile › Quadrillio's Posts
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 (of 25 pages)
*dhtml:that's why he's called LOJIK |
We're excited to announce Google Code Jam 2009, this year's iteration of Google's annual programming competition, which offers coders from around the world an opportunity to solve complex algorithmic problems under time pressure, using the programming languages and tools of their choice. This year's contest will consist of a qualification round followed by 3 full online rounds, culminating in a 25-person final in our Mountain View, California headquarters. We're still choosing the exact times for everything, but here's our tentative schedule: Early-Mid August: Registration will open. +4 Weeks: Qualification round +1 Week: Rounds 1A, 1B, 1C +1 Week: Round 2 +1 Week: Round 3 November: World Finals in Mountain View Online rounds begin soon, so start practicing |
@poster I believe you're richly blessed with this posts. especially, yawa-ti-de's comment |
I use this "<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> " and it tested and working on IE,Chrome,FF,Opera. any better one please share |
shit happen, Maybe she is not d one for you, at least u never said GIRLS dump you cos u are a programmer. It's just d first one. why not try another and see what life has to offer it doesn't stop on just one girl you know. wishing you d best |
I believe they have called u. let's get something straight u need them why not call them. just wondering |
what you want can only be done by someone with experience, u can call me: 08077796668 maybe we could work sometin out cos, Budget it a major factor |
hmmm |
Hello everyone what up? sori have been a bit busy. BRB |
Call me: 08077796668 Takia |
fajiboy:I been crackin my head about a project to give one of my student, this jus seems cool. (don't have time to crack one out for now) meekas:try that and let me know if u have any difficulties |
Warning - while you were reading 2 new replies have been posted. You may wish to review your post. that was what I got wen I tried to solve it, any way jus replace your \n wit I believe u can do that. |
I see that this class is for few privileged and power people, LOL *dhtml:All the best. |
Patiently waiting, |
IN CASE U NEVER KNOW PHP 5.3.0 Release Announcement The PHP development team is proud to announce the immediate release of PHP 5.3.0. This release is a major improvement in the 5.X series, which includes a large number of new features and bug fixes. The key features of PHP 5.3.0 include: Support for namespaces Late static binding Lambda Functions and Closures Syntax additions: NOWDOC, ternary short cut "?:" and jump label (limited goto), __callStatic() Under the hood performance improvements Optional garbage collection for cyclic references Optional mysqlnd PHP native replacement for libmysql Improved Windows support including VC9 and experimental X64 binaries as well as portability to other supported platforms More consistent float rounding Deprecation notices are now handled via E_DEPRECATED (part of E_ALL) instead of the E_STRICT error level Several enhancements to enable more flexiblity in php.ini (and ini parsing in general) New bundled extensions: ext/phar, ext/intl, ext/fileinfo, ext/sqlite3, ext/enchant Over 140 bug fixes and improvements to PHP, in particular to: ext/openssl, ext/spl and ext/date This release also drops several extensions and unifies the usage of internal APIs. Users should be aware of the following known backwards compatibility breaks: Parameter parsing API unification will cause some functions to behave more or less strict when it comes to type juggling Removed the following extensions: ext/mhash (see ext/hash), ext/msql, ext/pspell (see ext/enchant), ext/sybase (see ext/sybase_ct) Moved the following extensions to PECL: ext/ming, ext/fbsql, ext/ncurses, ext/fdf Removed zend.ze1_compatibility_mode visit the PHP website for more info. Class later |
Ogun G15 lawmakers in blood oath scandal •Storm Ijebu-Igbo shrine •Pledge first child THE crisis in Ogun State involving G 15 members of the House of Assembly was triggered by a blood oath taken at a shrine in Ijebu-Igbo, Ijebu North Local Government, last year, the Nigerian Compass learnt last night. The members took the oath to ensure a united front against Governor Gbenga Daniel. The oath was sponsored by some politicians including the father of a prominent politician in Abuja, a Senator, a former South-West governor, a former minister and another prominent politician in Ogun State. The oath, which was taken Unclad by the members and in daylight, was witnessed by the sponsors and the native doctors, the administrators of the oath. Items used for the oath included blood, cow heads, calabash and other fetish materials. Each participant swore to upholding opposition to Daniel at all times and submitted to the death of their first born, should they renege on the oath. Each of them was required to mention the name of their first child in the course of the oath, setting in motion serious consequences for the children should their fathers go back on the prescribed course of opposition. The Nigerian Compass learnt that the finality of this oath is why prominent traditional rulers such as the Awujale of Ijebuland, Oba Sikiru Adetona, the Alake of Egbaland, Oba Adedotun Aremu Gbadebo, the Akarigbo of Remoland, Oba Michael Sonariwo, and other prominent leaders such as Prince Bola Ajibola, General Tunji Olurin and Yeye Oodua H.I.D. Awolowo were unable to persuade them to change their stance. In exclusive photographs obtained by the Nigerian Compass, one of those who took the oath, Hon. Wale Alausa, representing Ijebu-Ode State Constituency and a member of the Peoples Democratic Party (PDP), is seen holding a white article of oath, standing in front of a calabash filled with blood at the shrine. The photographs were taken by the initiators of the oath to blackmail the G 15 members and prevent them from reneging. The Nigerian Compass obtained some of the photographs following a disagreement in the camp of the initiators. Behind him in the photograph on the right taken outside the shrine (with his hand showing) is one of the native doctors who administered the oath. The photograph on the left was taken inside the shrine. A source said last night: “It is because of the oath that the crisis in the state has been protracted. They have vowed that nobody or nothing will stop them from achieving their goal, which is to impeach the governor and make the state ungovernable. “This lawmaker called Alausa was jobless when his father, Alhaji Agboola Alausa, took him to the governor and the governor made him a special assistant in the office of the deputy governor. Even when he was working with Alhaja Salmot Badru, the deputy governor was not happy with him because of the various scandals he was involved in. “In 2007, the father also begged that he should be made a lawmaker and the state PDP respected his view by giving the Ijebu-Ode State Constituency to his son. “But since Wale Alausa and other members of the G 15 seized the Assembly in a coup last year, peace has eluded the state. That is why they are blocking the N50 billion bond and embarrassing members of the executive under the cover of oversight functions.” It would be recalled that the recalcitrant lawmakers began the festering crisis in the state by first impeaching the then Speaker, Mrs. Titi Shodunke-Oseni. They followed the impeachment with her suspension and that of another member of the House who was loyal to her, despite the fact that the court ruled otherwise. For several weeks, they also refused to sit, blaming lack of protection by security agents for their action. Besides, they recently passed Resolution 167 barring financial institutions from dealing with the state government, especially over its attempt to raise a N50 billion bond. Source: http://www.compassnews.net/news/index.php?option=com_content&view=article&id=21178:ogun-g15-lawmakers-in-blood-oath-scandal&catid=43:news&Itemid=63 THE REPLY WAS How Daniel Forced Me To Take Oath — Lawmaker Honourable Wale Alausa, representing Ijebu-Ode Constituency in the Ogun State House of Assembly, has said that Governor Gbenga Daniel forced him to take an oath in 2007 contrary to the report in the Nigerian Compass this morning. Reacting to the story, “Ogun 15 lawmakers on blood oath,” Hon. Alausa said it was a fabrication aimed at ridiculing his person and his colleagues in the house by Daniel and his agents. He confessed that the photographs published by Compass today were genuine but were taken in 2007 inside Daniel’s Sagamu mansion and its environs when he was forced to take an oath before he could get the PDP ticket to the state House of Assembly. The lawmaker said he and his colleagues (G15) never took any oath and neither did they visit any shrine in Ijebu-Igbo to take an oath, adding that it was pure blackmail by Daniel to stop the House from carrying out its oversight functions. “The photographs on the front page of Compass today were truly mine but the story was fabricated. I was forced to take the photographs in Governor Daniel’s Sagamu home in 2007 when he forcefully implemented the oath on me in order to get me a ticket to the House of Assembly. And that is what he has done to everybody. “Let him come out and deny, if he did not compel my father Chief Agboola Alausa to persuade me to take the oath. I rest my case for now. But the struggle continues,” he said. According to Compass, “the crisis in Ogun State involving G 15 members of the House of Assembly was triggered by a blood oath taken at a shrine in Ijebu-Igbo, Ijebu North Local Government, last year, the Nigerian Compass learnt last night. “The members took the oath to ensure a united front against Governor Gbenga Daniel. The oath was sponsored by some politicians including the father of a prominent politician in Abuja, a Senator, a former South-West governor, a former minister and another prominent politician in Ogun State.” The report added: “the oath, which was taken Unclad by the members and in daylight, was witnessed by the sponsors and the native doctors, the administrators of the oath. “Items used for the oath included blood, cow heads, calabash and other fetish materials. Each participant swore to upholding opposition to Daniel at all times and submitted to the death of their first born, should they renege on the oath. “Each of them was required to mention the name of their first child in the course of the oath, setting in motion serious consequences for the children should their fathers go back on the prescribed course of opposition. “The Nigerian Compass learnt that the finality of this oath is why prominent traditional rulers such as the Awujale of Ijebuland, Oba Sikiru Adetona, the Alake of Egbaland, Oba Adedotun Aremu Gbadebo, the Akarigbo of Remoland, Oba Michael Sonariwo, and other prominent leaders such as Prince Bola Ajibola, General Tunji Olurin and Yeye Oodua H.I.D. Awolowo were unable to persuade them to change their stance." What in Naija turning into, your views |
In previous lesson you have learned how to create arrays of data and manipulate them. This lesson examines how regular expressions are used to perform pattern matching on strings. Introducing Regular Expressions Using regular expressionssometimes known as regexis a powerful and concise way of writing a rule that identifies a particular string format. Because they can express quite complex rules in only a few characters, if you have not come across them before, regular expressions can look very confusing indeed. At its very simplest, a regular expression can be just a character string, where the expression matches any string that contains those characters in sequence. At a more advanced level, a regular expression can identify detailed patterns of characters within a string and break a string into components based on those patterns. Types of Regular Expression PHP supports two different types of regular expressions: the POSIX-extended syntaxwhich is examined in this lessonand the Perl-Compatible Regular Expression (PCRE). Both types perform the same function, using a different syntax, and there is really no need to know how to use both types. If you are already familiar with Perl, you may find it easier to use the PCRE functions than to learn the POSIX syntax. Documentation for PCRE can be found online at www.php.net/manual/en/ref.pcre.php. see u in d next class!!! |
Multidimensional Arrays It is possibleand often very usefulto use arrays to store two-dimensional or even multidimensional data. Accessing Two-Dimensional Data In fact, a two-dimensional array is an array of arrays. Suppose you were to use an array to store the average monthly temperature, by year, using two key dimensionsthe month and the year. You might display the average temperature from February 1995 as follows: echo $temps[1995]["feb"]; Because $temps is an array of arrays, $temps[1995] is an array of temperatures, indexed by month, and you can reference its elements by adding the key name in square brackets. Defining a Multidimensional Array Defining a multidimensional array is fairly straightforward, as long as you remember that what you are working with is actually an array that contains more arrays. You can initialize values by using references to the individual elements, as follows: $temps[1995]["feb"] = 41; You can also define multidimensional arrays by nesting the array function in the appropriate places. The following example defines the first few months for three years (the full array would clearly be much larger than this): $temps = array ( 1995 => array ("jan" => 36, "feb" => 42, "mar" => 51), 1996 => array ("jan" => 37, "feb" => 42, "mar" => 49), 1997 => array ("jan" => 34, "feb" => 40, "mar" => 50) ); The print_r function can follow as many dimensions as an array contains, and the formatted output will be indented to make each level of the hierarchy readable. The following is the output from the three-dimensional $temps array just defined: Array ( [1995] => Array ( [jan] => 36 [feb] => 42 [mar] => 51 ) [1996] => Array ( [jan] => 37 [feb] => 42 [mar] => 49 ) [1997] => Array ( [jan] => 34 [feb] => 40 [mar] => 50 ) ) |
Secretz:I concur |
Array Functions You have already seen the array function used to generate an array from a list of values. Now let's take a look at some of the other functions PHP provides for manipulating arrays. There are many more array functions in PHP than this book can cover. If you need to perform a complex array operation that you have not learned about, refer to the online documentation at www.php.net/ref.array. Sorting To sort the values in an array, you use the sort function or one of its derivatives, as in the following example: sort($temps); Sorting Functions sort and other related functions take a single array argument and sort that array. The sorted array is not returned; the return value indicates success or failure. Sorting the original $temps array with sort arranges the values into numeric order, but the key values are also renumbered. After you perform the sort, index 0 of the array will contain the lowest value from the array, and there is no way of telling which value corresponds to each month. You can use asort to sort an array while maintaining the key associations, whether it is an associative array or numerically indexed. After you sort $temps, index 0 will still contain January's average temperature, but if you loop through the array, the elements will be retrieved in sorted order. Using the associative array $temps as an example, the following code displays the months and their average temperatures, from coldest to hottest: $temps = array("jan" => 38, "feb" => 40, "mar" => 49, "apr" => 60, "may" => 70, "jun" => 79, "jul" => 84, "aug" => 83, "sep" => 76, "oct" => 65, "nov" => 54, "dec" => 42); asort($temps); foreach($temps as $month => $temp) { print "$month: $temp <br>\n"; } It is also possible to sort an array on the keys rather than on the element values, by using ksort. Using ksort on the associative $temps array arranges the elements alphabetically on the month name keys. Therefore, when you loop through the sorted array, the first value fetched would be $temps["apr"], followed by $temps["aug"], and so on. To reverse the sort order for any of these functions, you use rsort in place of sort. The reverse of asort is arsort, and the reverse of ksort is krsort. To reverse the order of an array as it stands without sorting, you simply use array_reverse. Randomizing an Array As well as sorting the values of an array into order, PHP provides functions so that you can easily randomize elements in an array. The shuffle function works in a similar way to the sorting functions: It takes a single array argument and shuffles the elements in that array into a random order. As with sort, the key associations are lost, and the shuffled values will always be indexed numerically. Set Functions By treating an array as a set of values, you can perform set arithmetic by using PHP's array functions. To combine the values from different arrays (a union operation), you use the array_merge function with two or more array arguments, as in the following example: $union = array_merge($array1, $array2, $array3, , ); A new array is returned that contains all the elements from the listed arrays. In this example, the $union array will contain all the elements in $array1, followed by all the elements in $array2, and so on. To remove duplicate values from any array, you use array_unique so that if two different index keys refer to the same value, only one will be kept. The array_intersect function performs an intersection on two arrays. The following example produces a new array, $intersect, that contains all the elements from $array1 that are also present in $array2: $intersect = array_intersect($array1, $array2); To find the difference between two sets, you can use the array_diff function. The following example returns the array $diff, which contains only elements from $array1 that are not present in $array2: $diff = array_diff($array1, $array2); Looking Inside Arrays The count function returns the number of elements in an array. It takes a single array argument. For example, the following statement shows that there are 12 values in the $temps array: echo count($temps); To find out whether a value exists within an array without having to write a loop to search through every value, you can use in_array or array_search. The first argument is the value to search for, and the second is the array to look inside: if (in_array("PHP", $languages)) { , } The difference between these functions is the return value. If the value exists within the array, array_search returns the corresponding key, whereas in_array returns only a Boolean result. Needle in a Haystack Somewhat confusingly, the order of the needle and haystack arguments to in_array and array_search is opposite that of string functions, such as strpos and strstr. To check whether a particular key exists in an array, you use array_key_exists. The following example determines whether the December value of $temps has been set: if (array_key_exists("dec", $temps)) { , } Serializing The serialize function creates a textual representation of the data an array holds. This is a powerful feature that gives you the ability to easily write the contents of a PHP array to a database or file. Lessons 17, "Filesystem Access," and 19, "Using a MySQL Database," deal with the specifics of filesystem and database storage. For now let's just take a look at how serialization of an array works. Calling serialize with an array argument returns a string that represents the keys and values in that array, in a structured format. You can then decode that string by using the unserialize function to return the original array. The serialized string that represents the associative array $temps is as follows: a:12:{s:3:"jan";i:38;s:3:"feb";i:40;s:3:"mar";i:49; s:3:"apr";i:60; s:3:"may";i:70;s:3:"jun"; i:79;s:3:"jul";i:84;s:3:"aug";i:83;s:3:"sep"; si:76;s:3:"oct";i:65;s:3:"nov";i:54;s:3:"dec";i:42;} You can probably figure out how this string is structured, and the only argument you would ever pass to unserialize is the result of a serialize operationthere is no point in trying to construct it yourself. Thank you, see u in the next class |
dedeike:yes Notin will Happen |
Nigerians are too stubborn, their are own pass GOAT STUBBORNNESS |
Shawty is a 10 Remix The Dream ft. R.Kelly |
Working with Arrays What Is an Array? An array is a variable type that can store and index a set of values. An array is useful when the data you want to store has something in common or is logically grouped into a set. Creating and Accessing Arrays The following PHP statement declares an array called $temps and assigns it 5 values that represent the temperatures for January through December: $temps = array(23, 33,11,13,70); The array $temps that is created contains 5 values that are indexed with numeric key values from 0 to 4. To reference an indexed value from an array, you suffix the variable name with the index key. To display, for example, you would use the following: echo $temps[2]; The square brackets syntax can also be used to assign values to array elements. To set a new value for another element, for instance, you could use the following: $temps[3] = 56; The array Function The array function is a shortcut function that quickly builds an array from a supplied list of values, rather than adding each element in turn. If you omit the index number when assigning an array element, the next highest index number will automatically be used. Starting with an empty array $temps, the following code would begin to build the same array as before: $temps[] = 38; $temps[] = 40; $temps[] = 49; , In this example, the value 38 would be assigned to $temps[0], 40 to $temps[1], and so on. If you want to make sure that these assignments begin with $temps[0], it's a good idea to initialize the array first to make sure there is no existing data in that array. You can initialize the $temps array with the following command: $temps = array(); Outputting the Contents of an Array PHP includes a handy function, print_r, that can be used to recursively output all the values stored in an array. The following script defines the array of temperature values and then displays its contents onscreen: $temps = array(38, 40, 49, 60, 70, 79, 84, 83, 76, 65, 54, 42); print "<PRE>"; print_r($temps); print "</PRE>"; The <PRE> tags are needed around print_r because the output generated is text formatted with spaces and newlines. The output from this example is as follows: Array ( [0] => 38 [1] => 40 [2] => 49 [3] => 60 [4] => 70 ) print_r The print_r function can be very useful when you're developing scripts, although you will never use it as part of a live website. If you are ever unsure about what is going on in an array, using print_r can often shed light on the problem very quickly. Looping Through an Array You can easily replicate the way print_r loops through every element in an array by using a loop construct to perform another action for each value in the array. By using a while loop, you can find all the index keys and their values from an arraysimilar to using the print_r functionas follows: while (list($key, $value) = each($temps)) { echo "Key $key has value $val <br>"; } For each element in the array, the index key value will be stored in $key and the value in $value. PHP also provides another construct for traversing arrays in a loop, using a foreach construct. Whether you use a while or foreach loop is a matter of preference; you should use whichever you find easiest to read. The foreach loop equivalent to the previous example is as follows: foreach($temps as $key => $value) { , } Loops You may have realized that with the $temps example, a for loop counting from 0 to 4could also be used to find the value of every element in the array. However, although that technique would work in this situation, the keys in an array may not always be sequential and, as you will see in the next section, may not even be numeric. Associative Arrays The array examples so far in this chapter have used numeric keys. An associative array allows you to use textual keys so that the indexes can be more descriptive. To assign a value to an array by using an associative key and to reference that value, you simply use a textual key name enclosed in quotes, as in the following examples: $temps["jan"] = 38; echo $temps["jan"]; To define the complete array of average monthly temperatures in this way, you can use the array function as before, but you indicate the key value as well as each element. You use the => symbol to show the relationship between a key and its value: $temps = array("jan" => 38, "feb" => 40, "mar" => 49, "apr" => 60, "may" => 70, "jun" => 79, "jul" => 84, "aug" => 83, "sep" => 76, "oct" => 65, "nov" => 54, "dec" => 42); The elements in an associative array are stored in the order in which they are defined (you will learn about sorting arrays later in this lesson), and traversing this array in a loop will find the elements in the order defined. You can call print_r on the array to verify this. The first few lines of output are as follows: Array ( [jan] => 38 [feb] => 40 [mar] => 49 , see u in the next class |
dhtml:I know you won't disappoint, with God on your side. am just dropping by to show my support. n in case am needed, u know where and how to get me. WE ARE WAITING |
people need to learn how to explain their problem, I always tell my students that one of the major rule of asking computer related questions is "WRITE DOWN THE ERROR MESSAGE" maybe we need to add that tutorial to our post, LOL |
@DHTML, thanks 4 keepin my thread bubbling while I was busy, You're really a brother Incase there is any question on the script posted, pls voice out, Am back and better, lets go there String Functions Let's take a look at some of the other string functions available in PHP. The full list of string functions can be found in the online manual, at www.php.net/manual/en/ref.strings.php. Capitalization You can switch the capitalization of a string to all uppercase or all lowercase by using strtoupper or strtolower, respectively. The following example demonstrates the effect this has on a mixed-case string: $phrase = "I love PHP"; echo strtoupper($phrase) . "<br>"; echo strtolower($phrase) . "<br>"; The result displayed is as follows: I LOVE PHP i love php If you wanted to functions capitalize only the first character of a string, you use ucfirst: $phrase = "welcome to the jungle"; echo $ucfirst($phrase); You can also capitalize the first letter of each wordwhich is useful for namesby using ucwords: $phrase = "green bay packers"; echo ucwords($phrase); Neither ucfirst nor ucwords affects characters in the string that are already in uppercase, so if you want to make sure that all the other characters are lowercase, you must combine these functions with strtolower, as in the following example: $name = "CHRIS NEWMAN"; echo ucwords(strtolower($name)); Dissecting a String The substr function allows you to extract a substring by specifying a start position within the string and a length argument. The following example shows this in action: $phrase = "I love PHP"; echo substr($phrase, 3, 5); This call to substr returns the portion of $phrase from position 3 with a length of 5 characters. Note that the position value begins at zero, not one, so the actual substring displayed is ove P. If the length argument is omitted, the value returned is the substring from the position given to the end of the string. The following statement produces love PHP for $phrase: echo substr($phrase, 2); If the position argument is negative, substr counts from the end of the string. For example, the following statement displays the last three characters of the stringin this case, PHP: echo substr($phrase, -3); If you need to know how long a string is, you use the strlen function: echo strlen($phrase); To find the position of a character or a string within another string, you can use strpos. The first argument is often known as the haystack, and the second as the needle, to indicate their relationship. The following example displays the position of the @ character in an email address: $email = "chris@lightwood.net"; echo strpos($email, "@" ;String Positions Remember that the character positions in a string are numbered from the left, starting from zero. Position 1 is actually the second character in the string. When strpos finds a match at the beginning of the string compared, the return value is zero, but when no match is found, the return value is FALSE. You must check the type of the return value to determine this difference. For instance, the condition strpos($a, $b) === 0 holds true only when $b matches $a at the first character. The strstr function extracts a portion of a string from the position at which a character or string appears up to the end of the string. This is a convenience function that saves your using a combination of strpos and substr. The following two statements are equivalent: $domain = strstr($email, "@" ;$domain = strstr($email, strpos($email, "@" );Like I said in the beginning am back and better. |

), why should I continue to work for someone else when I can have others working for me, whilst I look after my family and be a business woman at the same time.