原创 [Liferay]liferay hooks exercise startup
EXERCISE: CREATE A CUSTOM FIELD Let’s create the user’s custom field first: With the server up and running, log in as a
原创 [Euler]Problem 36 - Double-base palindromes
The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. Find the sum of all numbers, less than
原创 [Euler]Problem 34 - Digit factorials
145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. Find the sum of all numbers which are equal to the sum
原创 [Euler]Problem 30 - Digit fifth powers
Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits: 1634 = 14
原创 [Euler]Problem 32 - Pandigital products
We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once; for example
原创 [Liferay]liferay hooks overview and exercise
Hook overview Hooks were introduced in Liferay 5.1 as an alternate developmentapproach to the Liferay Extension Envir
原创 Sublime Text 2.0.1 編輯器中使用 Source Code Pro 字體
關於Sublime Text編輯器 官網 點這裏 非官方文檔 點這裏 關於Source Code Pro字體 git 點這裏 下載 點這裏 風格 點這裏 1 下載Sublime Text編輯器解壓,簡單介紹以及教程 點這裏 2 下載S
原创 [Liferay] 使用 Expando 自定義字段搜索對象
我們現在給 User 加一個自定義字段 “Height”, 有一個user 名字是 "John" ,其 “Height” 屬性值爲180. 現在需要搜索所有自定義字段 “Height” 值爲 180 的user。 先初始化兩個變量,
原创 [Liferay]使用Spring MVC開發Portlet應用
開發環境 IDE : Liferay Developer Studio Version: 1.6.1.v201212111822 Liferay : liferay-po
原创 [Liferay] Liferay 瘦身,Liferay 精簡,取消加載 Portlet
liferay version : liferay-portal-6.1.1-ce-ga2server : tomcat 7.0.25 Liferay是很龐大,Portal 自帶幾十個 Portl
原创 [Liferay]Portlet 之間使用 PortletSession 進行通信
Portlet 之間通信有三種方式: 1. PortletSession 2. IPC 3. Cookies 現在有個需要解決的問題,怎麼使用 Portlet A 在滿足一定條件的情況下,穿參數給 Portlet B,通過該參數改變 P
原创 [Exception]cannot cast java.lang.Class to java.lang.reflect.ParameterizedType
cannot cast java.lang.Class to java.lang.reflect.ParameterizedType 啓動服務器過程中出現這個異常, 實現通過反射獲取子類確定的泛型類, 父類: public class
原创 [Liferay] Liferay 實現單點登錄 - OpenLDAP
Liferay 的單點登錄絕對是個難啃的骨頭,更何況網上能搜到的基本都是些濫竽充數的文章,非常不負責任。 於是在自己搭通單點登錄一條線之後,決定整理下思路並寫出來,希望各位能別重蹈覆轍。 本文不介紹概念,只注重實現 軟件版本: Li
原创 [Liferay] 在 Liferay 使用 SpringMVC 的 @ResourceMapping
之前一篇介紹過 Portlet 的 Resource Serving 生命週期的概念以及使用方法, 因爲使用不同的 MVC 框架,框架代碼結構以及對 portlet 各個生命週期的調用方法都不一樣, 之前的項目都是用 Liferay 自己
原创 [Liferay]Portlet 規範中ResourceURL 介紹以及使用
關於 resourceURL: Resource Serving Phase 是在 JSP-286 (Portlet 2.0) 規範中增加的 portlet 生命週期之一, 另一個 Event Phase。 在一個 portlet 生命週