原创 Yii2.0 添加驗證碼

yii2.0添加驗證碼分爲三個層次,分別是MVC的三個層: 一、Controller 此次添加驗證碼是在login頁面,對應的controller爲SiteController: 首先,在actions里加入下面的代碼: public

原创 [LeetCode]575. Distribute Candies

Given an integer array with even length, where different numbers in this array represent different kinds of candies. Ea

原创 [LeetCode] 690. Employee Importance

Description 見https://leetcode.com/problems/employee-importance/description/ 我的代碼(AC) /* // Employee info class Employee

原创 [LeetCode]344. Reverse String

Write a function that takes a string as input and returns the string reversed. Example: Given s = “hello”, return “olle

原创 [LeetCode]500. Keyboard Row

Description Given a List of words, return the words that can be typed using letters of alphabet on only one row’s of Am

原创 Yii2.0 漢化(國際化)

1、修改配置文件 backend\config\main.php 添加 // set target language to be Chinese ‘language’ => ‘zh-CN’, // set source lang