[PHPUnit] Failed opening required autoload.php error

After a re-installation of the operating system Ubuntu 12.04, I got a problem by installing/using PHPUnit, this maybe not the same as your case, but I posted it just for sharing, I hope that could help.

Before all, I just want to remind that Using the PEAR Installer to install PHPUnit is no longer supported, more info in pear.phpunit.de and github.
Continue reading

[JS Practice] Changing Vowel(替换单词中的元音字母)

Title :

Changing Vowel(替换单词中的元音字母)


Step 1: Create a function called encode() to replace all the lowercase vowels in a given string with numbers according to the following pattern:

a -> 1

e -> 2

i -> 3

o -> 4

u -> 5

For example, encode(“hello”) would return “h2ll4″ There is no need to worry about uppercase vowels in this kata.

Step 2: Now create a function called decode() to turn the numbers back into vowels according to the same pattern shown above.

For example, decode(“h3 th2r2″) would return “hi there”

For the sake of simplicity, you can assume that any numbers passed into the function will correspond to vowels.

Continue reading

[JS Practice] Name Array Capping (第一个字母大写)

Title :

Name Array Capping (第一个字母大写)


Create a method that accepts an array of names, and returns an array of each name with its first letter capitalized.


example :

capMe([<span class="string">'jo'</span>, <span class="string">'nelson'</span>, <span class="string">'jurie'</span>]) <span class="comment">// returns ['Jo', 'Nelson', 'Jurie']</span> 
capMe([<span class="string">'KARLY'</span>, <span class="string">'DANIEL'</span>, <span class="string">'KELSEY'</span>]) <span class="comment">// returns ['Karly', 'Daniel', 'Kelsey']</span>

Continue reading

[Vocabulaire] coupe du monde 世界杯法语词汇

Faire un centre (传中)
Contre-attaquer (反击)
Corner (阳性,角球)
Touche (阴性,边线球)
Coup franc (阳性,任意球)
Tête (阴性,头球)
Penalty (阳性,点球)
Carton jeune (阳性,黄牌)
Carton rouge (阳性,红牌)
Avertissement (阳性,警告)
Hors-jeu (阳性,越位)
Jouer le joueur (冲撞)
Joueur (阳性,选手)
Gardien de but (阳性,守门员)
Footballeur (阳性,球员)
L’arbitre de terrain (阳性,主裁)
L’arbitre de touche (阳性,边裁)
Un attaquant (阳性,前锋)
Un défenseur (阳性,后卫)
Un buteur (阳性,射手)
Un milieu de terrain (阳性,中场)
Règle du jeu (比赛规则)
La cage (阴性,球门)
Le camp des bleus (阳性,蓝队一方)
La surface de réparation (阴性,禁区)
Marquer des buts (进球)
Circuler (传球)
Adverse (对方的)
Disputer (举行比赛)
S’entrainer (训练)
Entraineur (阳性,教练)
Championnat (阳性,锦标赛)
Eliminatoire (淘汰的)
Se qualifier (获得比赛资格)
Qualification (阴性,出线)
Huitième (八分之一决赛)
Demi-finale (半决赛)
Mi-temps (半场或中场休息)
Nul, le (平的)
Match nul (阳性,平局)
Prolongation (阴性,加时)
Dégager (把球传离)
Remise (阴性,重开球)
Adversaire (阳性,对于)
Défendre (防守)
Subtiliser (抢断)
Récupérer (收回)
Exclusion (阴性,罚出场)

[JS Practice] Remove odd number in an array (去掉数组中的奇数)

Title :

Remove odd number in an array (去掉数组中的奇数)


Write a small function that returns the values of an array that are not odd.

All values in the array will be integers. Return the good values in the order they are given.


Continue reading