原创 爲Drupal添加使用jquery框架編寫的js文件

正確引入js文件的前提下,如果使用jquery的代碼的話,需要用(function($) {...})(jQuery);將你的代碼包裹起來, 就像下面這樣子! (function($) { // your jquery

原创 Twig for Template Designers -- Annotation

This document describes the syntax and semantics of the template engine and will be most useful as reference to those

原创 Mac osx 基於系統的MAMP安裝過程

Mac osx 基於系統的MAMP安裝過程緣由環境準備安裝3組件填坑過程 緣由 在Mac上開發PHP幾年了,一直都是使用MAMP這樣的集成工具;最近出現MAMP經常死機的狀況; 或許因爲我本機同時開着Docker和MAMP等工具吧

原创 drupal drush exception 'PDOException' with message 'SQLSTATE[HY000] [2002]

解決方案: https://drupal.org/node/1651282 sudo mkdir /var/mysql sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/my

原创 New hooks for theme suggestions

Change record status:  Published (View all published change records) Project:  Drupal core Introduced i

原创 Drupal 8 - Custom classes for menu links

0down votefavorite How can I add custom classes for links into main menu in Drupal 8. This is template for

原创 How do I add classes to main menu ul and li in Drupal 8

1down votefavorite 1 I want to generate the html elements and their classes to fit my styling of the main m

原创 find與grep的組合使用

在當前目錄下所有文件中查找內容包含 string 的文件:find ./ -name "*" -exec grep "string" {} \;注意:在最後不能加 print ,否則會出錯. 在當前目錄下所有文件中查找內容包含 strin

原创 需求分析說明書和需求規格說明書的區別

區別: (一)面向對象上不同:           需求分析說明書往往面向業務人員、用戶        需求規格說明書往往面向設計、開發人員。   (二)生成階段不同:          一般先有需求分析說明書,後有需求規格說

原创 替換默認mac ctags

Mac 上使用ctags時遇到報錯: ctags: illegal option -- R 問題在於Mac預裝的Ctags是mac自己的版本,而我們通常所說的ctags是指Exuberant Ctags。上面這個-R的命令就是後者才能用

原创 CentOS6/7下安裝PHP5.6

美國時間2014年11月13日,PHP開發團隊,在「PHP 5.6.3 is available|PHP: Hypertext Preprocessor」上公佈了PHP5.6系的最新版本「PHP 5.6.3」。 在最新的版本5.6.3不僅

原创 Linux進程信號

原创 ls常用命令參數

原创 Twig模版語言入門

Twig中有兩種定界符{% ... %} 和 {{ ... }} , 前一種用來執行語句,比如for循環、IF判斷、過濾等操作,後一種模版中用來顯示變量。 Twig常用用法 可用符號 == != < > >= <= + - ~ * / /