In the first part of the Terminator, Rees Kyle talks about how cool the robots have learned to disguise themselves as humans. Now they have real skin and hair, they sweat, etc. He said about previous models that it was easy to distinguish them by rubber skin.
- / **
- * The function returns the ending for the plural of a word based on the number and array of endings.
- * param $ number Integer Number based on which you want to form the ending
- * param $ endingsArray Array Array of words or endings for numbers (1, 4, 5),
- * for example array ('apple', 'apples', 'apples')
- * return String
- * /
- function getNumEnding ( $ number , $ endingArray )
- {
- $ number = $ number % 100 ;
- if ( $ number > = 11 && $ number <= 19 ) {
- $ ending = $ endingArray [ 2 ] ;
- }
- else {
- $ i = $ number % 10 ;
- switch ( $ i )
- {
- case ( 1 ) : $ ending = $ endingArray [ 0 ] ; break ;
- case ( 2 ) :
- case ( 3 ) :
- case ( 4 ) : $ ending = $ endingArray [ 1 ] ; break ;
- default : $ ending = $ endingArray [ 2 ] ;
- }
- }
- return $ ending ;
- }
- / **
- * The function returns the ending for the plural of a word based on the number and array of endings.
- * param iNumber Integer Number based on which you want to form the ending
- * param aEndings Array Array of words or endings for numbers (1, 4, 5),
- * for example ['apple', 'apples', 'apples']
- * return String
- * /
- function getNumEnding ( iNumber , aEndings )
- {
- var sEnding , i ;
- iNumber = iNumber % 100 ;
- if ( iNumber > = 11 && iNumber <= 19 ) {
- sEnding = aEndings [ 2 ] ;
- }
- else {
- i = iNumber % 10 ;
- switch ( i )
- {
- case ( 1 ) : sEnding = aEndings [ 0 ] ; break ;
- case ( 2 ) :
- case ( 3 ) :
- case ( 4 ) : sEnding = aEndings [ 1 ] ; break ;
- default : sEnding = aEndings [ 2 ] ;
- }
- }
- return sEnding ;
- }
Source: https://habr.com/ru/post/105428/
All Articles